PIString and PIChar fixes 4
This commit is contained in:
@@ -263,12 +263,12 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) {
|
||||
UChar * ucs = new UChar[s];
|
||||
memset(ucs, 0, s * sizeof(UChar));
|
||||
e = (UErrorCode)0;
|
||||
int sz = ucnv_toUChars(cc, ucs, s, c, s, &e);
|
||||
sz = ucnv_toUChars(cc, ucs, s, c, s, &e);
|
||||
//printf("appendFromChars %d -> %d\n", s, sz);
|
||||
//printf("PIString %d -> %d\n", c[0], ucs[0]);
|
||||
reserve(size_s() + sz);
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
push_back(PIChar(ucs[i]));
|
||||
push_back(PIChar((ushort)ucs[i]));
|
||||
}
|
||||
delete[] ucs;
|
||||
ucnv_close(cc);
|
||||
|
||||
Reference in New Issue
Block a user