diff --git a/src_main/core/pichar.cpp b/src_main/core/pichar.cpp index 2ef2d832..979088a1 100644 --- a/src_main/core/pichar.cpp +++ b/src_main/core/pichar.cpp @@ -312,9 +312,15 @@ PICout operator <<(PICout s, const PIChar & v) { s << v.toSystem(); //else // s << v.toConsole1Byte(); -#else - s << v.toCharPtr(); #endif + if (v.isAscii()) s << char(v.ch); + else { + char tc[8]; + wctomb(0, 0); + int sz = wctomb(tc, v.ch); + for (int b = 0; b < sz; ++b) + s << tc[b]; + } s.restoreControl(); return s; }