diff options
author | Retro-Junk | 2016-09-06 22:04:47 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-06 21:44:55 +0200 |
commit | a646936fb18ba757e8c86b192c3995e808990845 (patch) | |
tree | c39c4459c196554916517f2013a968e25e542adc | |
parent | 471c76a9a75a41615f6fd0788cb36f0da18f961f (diff) | |
download | scummvm-rg350-a646936fb18ba757e8c86b192c3995e808990845.tar.gz scummvm-rg350-a646936fb18ba757e8c86b192c3995e808990845.tar.bz2 scummvm-rg350-a646936fb18ba757e8c86b192c3995e808990845.zip |
FULLPIPE: Use cp866 for logging on Windows build
-rw-r--r-- | engines/fullpipe/utils.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 148f779d1e..de7cbbbaab 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -473,6 +473,19 @@ byte *transCyrillic(byte *s) { int i = 0; for (byte *p = s; *p; p++) { +#ifdef WIN32 + // translate from cp1251 to cp866 + byte c = *p; + if (c >= 0xC0 && c <= 0xEF) + c = c - 0xC0 + 0x80; + else if (c >= 0xF0 && c <= 0xFF) + c = c - 0xF0 + 0xE0; + else if (c == 0xA8) + c = 0xF0; + else if (c == 0xB8) + c = 0xF1; + tmp[i++] = c; +#else if (*p < 128) { tmp[i++] = *p; } else { @@ -487,6 +500,7 @@ byte *transCyrillic(byte *s) { assert(trans[j]); } +#endif } tmp[i] = 0; |