Oct 31, 2010 at 1:39pm Oct 31, 2010 at 1:39pm UTC
Hello!
I tried to copy it from character map but doesn`t work.
Is it able to print (cout) a eurosign ?
With a little search i read somewhere that is no possible to display non-ASCII characters to the console. Is that true ?
Oct 31, 2010 at 1:45pm Oct 31, 2010 at 1:45pm UTC
That depends entirely on the console.
On most cout << "€" ;
will work just fine.
Oct 31, 2010 at 4:19pm Oct 31, 2010 at 4:19pm UTC
On most cout << "€"; will work just fine.
This is true for most Linux terminals I think, since Linux terminals accept UTF-8 by default. However it certainly isn't the case on Windows.
Outputting Unicode to the windows console is possible, but it's a lot of work. There was a big thread on it over a year ago... maybe I can dig it up...
*looks*
Here it is:
http://www.cplusplus.com/forum/windows/9797/ <-- the thread
http://www.cplusplus.com/forum/windows/9797/page3.html#msg46844 <--- one of the more significant posts in the thread
As you can see it's quite a hassle, so it probably isn't worth it for you.
Last edited on Oct 31, 2010 at 4:20pm Oct 31, 2010 at 4:20pm UTC
Oct 31, 2010 at 5:02pm Oct 31, 2010 at 5:02pm UTC
Thanks a lot Disch and Athar , i will give it a look!