git-svn-id: svn://db.shs.com.ru/pip@255 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user