Re: console charset

new topic     » goto parent     » topic index » view thread      » older message » newer message
Salix said...

I have an entry level question. :-> Whenever I print something onto the screen some special characters are not readable for me. E.g.

puts(1,"Helló világ!") -- means "Hello world" in Hungarian 
 

would appear incorrectly due to the "ó" and "á" characters. I suppose it is because of the codepage differences. But is there a simple way of defining that the script I saved in UTF-8 should print to the console/command line the text as ibm852 charset? I'm equally interested in Win and Linux solution...

Thanks for any tips/hints/ideas in advance!

Salix

On windows there two simple Win32 API functions to convert from/to OEM
CharToOem() http://msdn.microsoft.com/en-us/library/ms647473%28VS.85%29.aspx
OemToChar() http://msdn.microsoft.com/en-us/library/ms647493%28VS.85%29.aspx

This convert from windows codepage to console codepage or the opposite

Jacques

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu