Wide char issues

1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

int main()
{
    wchar_t b = L'猫';
    wcout << b << endl;
}


The result I'm getting is \253. Any idea what's going wrong?
I'm no console expert, but I can tell you that even though wcout accepts wide chars, it internally converts it to ANSI. By default, the console doesn't display Unicode.

In Windows you have to use the Windows API for consoles to change this. How? Which functions? Don't remember right now. :-( But Google it up as the topic as appeared a few times here and I bet elsewhere.
Topic archived. No new replies allowed.