Compare string with German umlauts

Martin Tschierschke mt at smartdolphin.de
Tue May 19 07:57:33 UTC 2020


On Monday, 18 May 2020 at 14:22:31 UTC, WebFreak001 wrote:
[...]
>> It solved the problem, but what is the right way to use 
>> umlauts (encode them) inside the program?
>
> Your code should have already worked like that, assuming your 
> input file is a UTF-8 file. Check with an editor like Notepad++ 
> or Visual Studio Code what the actual encoding of your text 
> file is. In D all strings you specify in source are UTF-8 bytes 
> in the end and a byte-by-byte comparison like with your line == 
> "..." will cause it to fail if line is not UTF-8.
Thank you, I will check your hints!


More information about the Digitalmars-d-learn mailing list