Unicode support in C++0x

后端 未结 3 1685
太阳男子
太阳男子 2021-01-04 03:17

I\'m trying to use new unicode characters in C++0x. So I wrote sample code:

#include 
#include 
int main()
{
    std::u32string          


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 04:00

    In new C++ standard there will not be Unicode streams.

    As @ssmir mentioned, standard committee was going to add stream support for Unicode in C++0x. However in the feature editions committee decided to remove stream support for Unicode. For more information see this link.

    It seams like the only way to output Unicode string is to convert it to ASCII string with codecvt .

提交回复
热议问题