This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: UTF-8 support - char or wchar_t
- From: eric at boese-wolf dot eu (Eric BÃse-Wolf)
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 14 Sep 2009 22:42:34 +0200
- Subject: Re: UTF-8 support - char or wchar_t
- References: <40D5D37D.10600@suse.de>
Hello!
> #include <iostream>
> int main()
> {
> std::ios::sync_with_stdio(false);
^^^ Why is this line necessary? I read, that
sync_with_stdio(false) "decouples" the C
streams and the C++ streams, but why is
that necessary such that std::wcout
produces UTF8?
> std::wcout.imbue(std::locale("fi_FI.UTF-8"));
> std::wcout << 1224 << std::endl;
> }
> It works as you expext.
> Paolo.
Eric