PIString and PIChar fixes 2

This commit is contained in:
Andrey
2022-03-25 14:07:37 +03:00
parent 649850a1ba
commit 0ad6ca6602
2 changed files with 2 additions and 2 deletions

View File

@@ -91,7 +91,7 @@ ushort charFromCodepage(const char * c, int size, const char * codepage, int * t
ret = mbtowc(&wc, c, size); ret = mbtowc(&wc, c, size);
//printf("mbtowc = %d\n", ret); //printf("mbtowc = %d\n", ret);
if (ret < 1) return 0; if (ret < 1) return 0;
return ushort(int(wc)); return ushort(wc);
# endif # endif
#endif #endif
return ushort(c[0]); return ushort(c[0]);

View File

@@ -68,7 +68,7 @@ inline PIString StdWString2PIString(const std::wstring & v) {
PIString s; PIString s;
uint l = v.size(); uint l = v.size();
for (uint i = 0; i < l; ++i) { for (uint i = 0; i < l; ++i) {
s.push_back(v[i]); s.push_back(PIChar(v[i]));
} }
return s; return s;
} }