[Bug libstdc++/37298] no output when use wcout and cout, wrong utf16 -> utf8 conversion

paolo dot carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Sun Aug 31 20:58:00 GMT 2008



------- Comment #4 from paolo dot carlini at oracle dot com  2008-08-31 20:57 -------
(In reply to comment #3)
> Very strange.... uft16->utf8 conversion seems be very easy, and required for 
> proper output on contemporary Linux.

By the way, contemporary Linux, or any Linux for that matter, is normally part
of a GNU / Linux system and in that case wchar_t is always 32 bits wide, UCS-4
encoding. UTF-16 doesn't play an important role. See the glibc docs for further
information. Our implementation, if sync_with_stdio(false) is called, is
perfectly able to convert back and forth from an internal wchar_t (UCS-4)
encoding to an external char (UTF-8) encoding, via the delivered codecvt facet.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37298



More information about the Gcc-bugs mailing list