我试图找出c中的宽字符。例如,我测试了一个包含单个字母“?”的字符串。在utf8中编码为c492。
char* T1 = "?";
//This is the resulting array { 0xc4, 0x92, 0x00 }
wchar_t* T2 = L"?";
//This is the resulting array { 0x00c4, 0x2019, 0x0000 }
Run Code Online (Sandbox Code Playgroud)
我期望第二个数组为{0xc492,0x0000},相反,它包含一个多余的字符,我认为这只是浪费空间。谁能帮助我了解这是怎么回事?