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

This commit is contained in:
2017-09-06 08:08:20 +00:00
parent ce2229eeec
commit 6d1852c535
5 changed files with 26 additions and 6 deletions

View File

@@ -235,7 +235,7 @@ wchar_t PIChar::toWChar() const {
}
char PIChar::toConcole1Byte() const {
char PIChar::toConsole1Byte() const {
if (ch < 0x80) return ch;
#ifdef PIP_ICU
UErrorCode e((UErrorCode)0);
@@ -252,6 +252,23 @@ char PIChar::toConcole1Byte() const {
}
char PIChar::toSystem() const {
if (ch < 0x80) return ch;
#ifdef PIP_ICU
UErrorCode e((UErrorCode)0);
UConverter * cc = ucnv_open(__syslocname__, &e);
if (cc) {
char uc[8];
e = (UErrorCode)0;
ucnv_fromUChars(cc, uc, 8, (const UChar*)(&ch), 1, &e);
ucnv_close(cc);
return uc[0];
}
#endif
return toAscii();
}
PIChar PIChar::toUpper() const {
#ifdef PIP_ICU
UChar c(0);