This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UTF-8 support - char or wchar_t


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]