View Single Post
Old 05-09-2013, 09:29 PM   #23
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,613
Default

Yep I had no idea myself, I just researched it on the go, so I was learning too. I've tried enabling the "compile as C" (as opposed to C++) in Visual Studio and this code works, I think it should be portable to any Unicode-enabled platform:

Code:
#include <stdio.h>
#include <stddef.h>
#include <io.h>
#include <fcntl.h>

int main(void)
{	
	_setmode(_fileno(stdout), _O_U16TEXT);
	wprintf(L"Hell\u00f8 wørld!\n");
	return 0;
}
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote