I call a small apple -- wait for it -- an apple. And a small pizza -- is still a pizza. Don't know what you call them.
I call a small apple -- wait for it -- an apple. And a small pizza -- is still a pizza. Don't know what you call them.
I also call both ASCII and Unicode (specific types of apples) "character sets" (apples).
Your analogy is backwards. ASCII is a small apple (only 128 "bites" ), and Unicode is a larger apple (thousands of "bites"), but an apple as large as Unicode or any of the "ASCII extensions" is not a small apple.
I also wouldn't call an apple a Gala unless it actually were a Gala. I can just imagine you at a grocery store:
Adak: "I'd like some Galas!"
Clerk: "We have only Granny Smiths"
Adak: "I'll take those! They're still Galas!"
If you don't call setlocale(), then you can't expect anything to work other than the "basic character set" which the default "C" local provides.
On *nix with a UTF8 locale, you can call setlocale(LC_ALL, "") and perform direct Unicode output with either wchar_t's or UTF8 encoded char's.
gg
Well, the nice thing about what codeplug gave is that it degrades gracefully... right now I get the "this prob. wont work" message (meaning I don't have a 64 bit compiler) but I still get halfway decent character support, which is better than nothing.
Last edited by whiteflags; 11-03-2012 at 10:22 PM.
What I was aiming for was:
(_MSC_VER >= 1500) = Visual C++ 2008 or higher
(__MSVCRT_VERSION__ >= 0x0800) = MinGW using MS CRT from VS 2008
Support for direct Unicode output was added to the MS CRT that comes with VS 2008. So if you aren't using that CRT, and are compiling on Windows, then it "prob. won't work". You can use WriteConsoleW() directly if you don't have "_O_U16TEXT".
gg