|
From: Gisle V. <gv...@br...> - 2012-01-11 21:29:20
|
"LRN" <lr...@gm...> wrote: > You're trying to output strings encoded in UTF-16 to a text console > that has your system's default ANSI codepage set up. I am? Okay, probably. I'm utterly bewildered. > Speaking of which, you can use SetConsoleCP() to set console output > codepage to something better, like UTF-8, and write strings encoded > that way, and they will show up nicely. SetConsoleCP() does not seem > to be able to set UTF-16 encoding, which means that you can't write > wide strings into console directly, you need to convert them to UTF-8 > (or whatever you're going to use). Okay, I didn't full grasp that. I will study this confusing subject later. But a quick call to SetConsoleCP (65001) (i.e. that should be UTF-8 according to MSDN), didn't improve things. > I'm not sure why Watcom-compiled code works. Maybe it has its own C > runtime that handles this problem? Yeah. I briefly search through it's sources, but failed to find calls to SetConsoleCP() etc. But thank anyway; LRN and esp. Thomas for a very informative replies. --gv |