linux test

This commit is contained in:
2022-04-25 22:01:50 +03:00
parent 914ff5355d
commit 2246b8b5fd

View File

@@ -231,11 +231,11 @@ void PIString::appendFromChars(const char * c, int s, const char * codepage) {
# else
mbstate_t state;
memset(&state, 0, sizeof(state));
size_t len = mbsrtowcs(NULL, c, 0, &state);
size_t len = mbsrtowcs(NULL, &c, 0, &state);
wchar_t wstr[len+1];
mbsrtowcs(&wstr[0], c, len+1, &state);
mbsrtowcs(&wstr[0], &c, len+1, &state);
resize(len);
for (int i=0 i<len; ++i) (*this)[i] = wstr[i];
for (int i=0; i<len; ++i) (*this)[i] = wstr[i];
// wchar_t wc;
// //qDebug() << "FromChars ...";
// while (sz = mbrtowc(&wc, c, s, &state) > 0) {