Handling UTF-8 in C++

前端 未结 3 2089
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 17:15

To find out if C++ is the right language for a project of mine, I wanna test the UTF-8 capabilities. According to references, I built this example:

#include          


        
3条回答
  •  一整个雨季
    2020-12-16 17:50

    Remember that on startup of the main program, the "C" locale is selected as default. You probably don't want this if you handle utf-8. Calling setlocale(LC_CTYPE, "") turns off this default, and you get whatever is defined in the environment (presumably a utf-8 locale).

提交回复
热议问题