#include <iostream>
#include <iomanip>
constexpr int SIZE=20;
int main()
{
wchar_t input[SIZE+1];
std::wcin >> input;
input[SIZE] = '\0';
wchar_t c;
for(int i=0; i<SIZE; ++i)
{
c=input[i];
std::cout << std::setw(4) << std::hex << +c << ' ';
}
}
With this code, if I enter any non-latin characters I can see 0's in their position. For example, if I enter ФФFF, I get
0 0 46 46 0 40 0 0 8 0 0 0 c 0 0 0 13a0 d1 0 0
I'm running Windows 10, using VSC and C++11 as a compiler, and I use unicode hex character set (Cyrillic letters). If I hardcode the characters and bypass wcin, I get
424 424 46 46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0