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

This commit is contained in:
2016-09-06 12:46:39 +00:00
parent 73cc277f23
commit d321b01f10
10 changed files with 510 additions and 69 deletions

View File

@@ -38,14 +38,15 @@ char * __sysoemname__ = 0;
*/
PIChar::PIChar(const char * c) {
PIChar::PIChar(const char * c, int * bytes) {
#ifdef PIP_ICU
UErrorCode e((UErrorCode)0);
UConverter * cc = ucnv_open(__syslocname__, &e);
if (cc) {
UChar uc;
e = (UErrorCode)0;
ucnv_toUChars(cc, &uc, 1, c, 4, &e);
int ret = ucnv_toUChars(cc, &uc, 1, c, 4, &e);
if (bytes) * bytes = ret;
ucnv_close(cc);
ch = uc;
return;