How to print unicode characters (no library)?

Kagamin spam at here.lot
Mon Dec 27 14:47:51 UTC 2021


On Monday, 27 December 2021 at 11:21:54 UTC, rempas wrote:
> So should I just use UTF-8 only for Linux? What about other 
> operating systems? I suppose Unix-based OSs (maybe MacOS as 
> well if I'm lucky) work the same as well. But what about 
> Windows? Unfortunately I have to support this OS too with my 
> library so I should know. If you know and you can tell me of 
> course...

https://utf8everywhere.org/ - this is an advise from a windows 
programmer, I use it too. Windows allocates a per thread buffer 
and when you call, say, WriteConsoleA, it first transcodes the 
string to UTF-16 in the buffer and calls WriteConsoleW, you would 
do something like that.


More information about the Digitalmars-d-learn mailing list