git-svn-id: svn://db.shs.com.ru/pip@534 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-08-09 20:12:36 +00:00
parent ae6d397e0e
commit 5dcc867689
5 changed files with 71 additions and 36 deletions

View File

@@ -32,6 +32,9 @@ char * __sysoemname__ = 0;
#ifdef BLACKBERRY
# include <ctype.h>
#endif
//#ifdef ANDROID
# include <wchar.h>
//#endif
/*! \class PIChar
* \brief Unicode char
@@ -110,7 +113,14 @@ PIChar PIChar::fromUTF8(const char * c) {
return ret;
}
#endif
ret.ch = *(ushort*)c;
//#ifdef ANDROID
wchar_t wc(0);
mbstate_t s;
mbrtowc(&wc, c, 4, &s);
ret.ch = wc;
return ret;
//#endif
// ret.ch = *(ushort*)c;
return ret;
}