This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37298] no output when use wcout and cout, wrong utf16 -> utf8 conversion
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2008 20:57:37 -0000
- Subject: [Bug libstdc++/37298] no output when use wcout and cout, wrong utf16 -> utf8 conversion
- References: <bug-37298-16650@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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