Wired question related with Chinese characters
lovemini
lovemini at gmail.com
Sun Mar 29 10:21:57 UTC 2020
On Sunday, 22 March 2020 at 15:19:13 UTC, walker wrote:
> I am new to dlang, I like it :)
> I am on windows10 and use the terminal preview to test and run
> programs.
>
> In order to print Chinese characters correctly, I always use
>
> void main()
> {
> string var1 = "你好"; # to!string(in_other_conditions)
> writeln(var1);
> }
>
> I tried dstring but not working. Need Help Here.
>
> ---------------------------------
> The wired thing is the above approach may not work sometimes ->
> corrupted characters show up.
>
> However, if I run in the same place a little program written in
> nim (just print hello world), then I run the same dlang
> program, the Chinese character is print correctly.
>
> Why that happened?
More information about the Digitalmars-d-learn
mailing list