From 88267912c3adb53c34e0bc2e07f9806b26be9d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 6 Mar 2020 07:56:42 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@909 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/core/pichar.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; }