How to print unicode characters (no library)?

Adam D Ruppe destructionator at
Mon Dec 27 16:40:19 UTC 2021

On Monday, 27 December 2021 at 15:26:16 UTC, H. S. Teoh wrote:
> A lot of modern Linux applications don't even work properly 
> under anything non-UTF-8

yeah, you're supposed to check the locale but since so many 
people just assume that's becoming the new de facto reality

just like how people blindly shoot out vt100 codes without 
checking TERM and that usually works too.

> I'm not a regular Windows user, but I did remember running into 
> problems where sometimes command.exe doesn't handle Unicode 
> properly, and needs an API call to switch it to UTF mode or 
> something.

That'd be because someone called the -A function instead of the 
-W ones. The -W ones just work if you use them. The -A ones are 
there for compatibility with Windows 95 and have quirks. This is 
the point behind my blog post i linked before, people saying to 
make that api call don't understand the problem and are patching 
over one bug with another bug instead of actually fixing it with 
the correct function call.

More information about the Digitalmars-d-learn mailing list