What is the alternative to the setlocale function of c in D? Thank you.
John Chapman
johnch_atms at hotmail.com
Sat Jan 26 09:33:33 UTC 2019
On Saturday, 26 January 2019 at 06:03:25 UTC, FrankLike wrote:
> On Friday, 25 January 2019 at 15:05:50 UTC, John Chapman wrote:
>> On Friday, 25 January 2019 at 14:23:15 UTC, FrankLike wrote:
>>> I need to set the font by the code now, because I need to do
>>> the installer, can't let this installer set the properties on
>>> each computer?
>>
>> SetCurrentConsoleFontEx perhaps?
>>
>> https://docs.microsoft.com/en-us/windows/console/setcurrentconsolefontex
>
> That's so much code than next code.
>
> ///////////////////////////////////////////////
> extern(C) int setlocale(int,char*);
>
> static this()
> {
> import core.stdc.wchar_;
> import core.stdc.stdio;
> fwide(core.stdc.stdio.stdout,1);
> setlocale(0,cast(char*)"china");
> }
> ///////////////////////////////////
> But After D2.078.1,it's not work.
> Why?
> Thank you.
What has that code got to do with setting the console's font? So
you need to add more code to accomplish that.
More information about the Digitalmars-d-learn
mailing list