Hmm it's been a while since I learned C...
Apparently (of course) Unicode is now part of the standard library. See versions of standard functions that include the letter w, for example:
http://msdn.microsoft.com/en-us/library/wc7014hz.aspx
Wide char strings are made of wchar_t instead of char, and their literals are preceded with an L:
Code:
wprintf(L"Hell\u00f8 wørld! %s",
L'ø' == L'\u00f8' ? L"True" : L"False");
To change the console mode from ANSI to Unicode (solving the °/ø confusion), apparently you can do this:
Code:
#include <io.h>
#include <fcntl.h>
Code:
_setmode(_fileno(stdout), _O_U16TEXT);
Make sure though that the font used by your console window does have those strange characters. It's not the case by default in my case, but you can right-click on the console window title bar and go to choose properties > font tab. Then restart your program, because the font will have transformed the strange characters to ? or normal letters before outputting them. (See how pointless all this is...!)