简体   繁体   English

C ++ Unicode UTF-8解码字符问题

[英]Problem with c++ unicode utf-8 decode characters

I'm trying to print some encoding characters using "en_US.UTF-8" standard on a Linux machine, but there are some characters that do not appear. 我正在尝试在Linux机器上使用“ en_US.UTF-8”标准打印一些编码字符,但是有些字符没有出现。 I can see characters from 161 to 255 correctly, but from 128 to 160 I can not see anything. 我可以正确看到从161到255的字符,但是从128到160则看不到任何字符。 This is the code I am using: 这是我正在使用的代码:

int main(void)
{      

    setlocale(LC_ALL, "en_US.UTF-8");
    wchar_t c;

    for (c = 128; c < 256; c++) {
      std::wcout<< " \n" << c << '\n';
       }

    return 0;
}

someone who can help me with this? 有人可以帮助我吗? I would appreciate it very much. 我会非常感激。

The Unicode code points between 128 and 160 represent (non-printable) control codes. 128至160之间的Unicode代码点表示(不可打印的)控制代码。

Cf. cf. Unicode chart table Unicode图表表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM