Page 1 of 1

How to print utf8 text "Klöße" out to console ?

Posted: Sun Dec 30, 2012 8:25 pm
by Octopus
How to do this in a way, which will be working on all supported operating systems?

Re: How to print utf8 text "Klöße" out to console ?

Posted: Sun Dec 30, 2012 9:15 pm
by luis
Woks on Windows, does not work elsewhere ?

Code: Select all

CompilerIf (#PB_Compiler_Unicode = 1)
 OpenConsole()
 Print("Klöße")
 Input()
 CloseConsole()
CompilerElse 
 CompilerError "Enable Unicode"
CompilerEndIf

Re: How to print utf8 text "Klöße" out to console ?

Posted: Sun Dec 30, 2012 11:25 pm
by Octopus
Thanks for this fillip!

Re: How to print utf8 text "Klöße" out to console ?

Posted: Mon Dec 31, 2012 10:39 am
by Shield
If you don't want to use Unicode, you can use this for Windows:

Code: Select all

OpenConsole()
text$ = "Klöße"
CharToOem_(@text$, @text$)
Print(text$)
Input()