how to localize console and GUI apps in Windows

thedeemon dlang at thedeemon.com
Wed Jan 3 11:32:22 UTC 2018


On Wednesday, 3 January 2018 at 09:11:32 UTC, thedeemon wrote:
> you need to use TextOutW that accepts 16-bit Unicode, so just 
> convert your UTF-8 D strings to 16-bit Unicode wstrings, there 
> are appropriate conversion functions in Phobos.

Some details:
import std.utf : toUTF16z;
...
string s = "привет";
TextOutW(s.toUTF16z);


More information about the Digitalmars-d-learn mailing list