Skip to content

Windows 10 RS4 supports locale ".utf8" already, I wonder why setlocale doesn't make fmt::print with L-string work? #1229

@denchat

Description

@denchat

Now we can do this std way on Windows 10 v1803 or later

std::setlocale(LC_ALL, "en_US.utf8");
wprintf(L"zß水");

but fmt::print still do need this :

_setmode( _fileno(stdout), _O_WTEXT );

Otherwise, it only prints 'z'.

I wonder why? Is there some performance hits to support setlocale like wprintf?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions