How do I display unicode characters in D on standard (english) Windows 10 console window?

Carl Sturtivant sturtivant at gmail.com
Wed Jul 31 21:40:53 UTC 2019


On Monday, 29 July 2019 at 22:17:55 UTC, WhatMeWorry wrote:
> This is a very stupid question but from Ali's book, I took this 
> segment:
>
>
> writeln("Résumé preparation: 10.25€");
> writeln("\x52\ésum\u00e9 preparation: 10.25\€");
>
>
> and after running it all I get is the following:
>
>
> Résumé preparation: 10.25€
> Résumé preparation: 10.25€
>
>
> I was expecting the symbol "£" or something like that.  What am 
> I missing?

In my Windows 10 build 1803 I was able to find a box to check to 
globally use the UTF-8 code page. Checking it requires a restart 
as it says the locale has changed.

Settings>Time&Language>Region&Language>Administrative_Language_Settings
brings up a Region dialog, and clicking on "Change system 
locale..." brought up a dialog where this box can be checked.

After doing this the console acted sensibly right away with the 
code you wrote.


More information about the Digitalmars-d-learn mailing list