Go Back   Forums > Community Chatterbox > Tech Corner
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 05-09-2013, 08:02 PM   #1
jonh_sabugs
Abandonia nerd

 
Join Date: May 2010
Location: Brazil
Posts: 91
Default

You are right, I stand corrected.
jonh_sabugs is offline                         Send a private message to jonh_sabugs
Reply With Quote
Old 05-09-2013, 09:29 PM   #2
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
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
EoF Corner Eagle of Fire Offers 6 03-02-2010 05:01 PM
The end of the file corner Eagle of Fire Music, Art, Movies 8 08-12-2009 12:09 AM
Spoonman's Art Corner Spoonman Music, Art, Movies 122 15-01-2009 09:35 PM
Spoonman's Music Corner Spoonman Music, Art, Movies 3 25-06-2005 05:18 PM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 05:14 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.