CtrlCore: Fixed encoding issue with Win32 clipboard text

git-svn-id: svn://ultimatepp.org/upp/trunk@15926 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2021-04-20 12:04:52 +00:00
parent 9be3584f71
commit e4e867040c
2 changed files with 5 additions and 2 deletions

View file

@ -380,7 +380,7 @@ Value ConvertDouble::Scan(const Value& txt) const {
int ConvertDouble::Filter(int chr) const {
chr = CharFilterDouble(chr);
return comma && chr == '.' ? ',' : chr;
return comma && chr == '.' ? ',' : chr;
}
ConvertDouble::ConvertDouble(double minval, double maxval, bool notnull)

View file

@ -315,7 +315,10 @@ String ReadClipboardText()
#ifdef PLATFORM_WINCE
return ReadClipboardUnicodeText().ToString();
#else
String s = ReadClipboard((const char *)CF_TEXT);
String s = ReadClipboardUnicodeText().ToString();
if(s.GetCount())
return s;
s = ReadClipboard((const char *)CF_TEXT);
return String(s, (int)strlen(~s));
#endif
}