String characters not extended

Daniel Kozák via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 3 11:40:20 PST 2017


Anonymouse via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com> 
napsal Út, led 3, 2017 v 12∶34 :
> On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:
>> [...]
> 
> Assuming Windows:
> 
> version(Windows)
> shared static this()
> {
>     import core.sys.windows.windows;
>     SetConsoleCP(65001);
>     SetConsoleOutputCP(65001);
> }

Why do not use CP_UTF8 constant instead of 65001? It is safer, easier 
to read and understand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20170103/422a7912/attachment.html>


More information about the Digitalmars-d-learn mailing list