[Bug 251674] std::wcout doesn't print unicode wide characters: std::wcout defaults to "C" locale, not to user's locale

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 8 05:09:49 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251674

Yuri Victorovich <yuri at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|std::wcout doesn't print    |std::wcout doesn't print
                   |unicode wide characters     |unicode wide characters:
                   |                            |std::wcout defaults to "C"
                   |                            |locale, not to user's
                   |                            |locale

--- Comment #6 from Yuri Victorovich <yuri at freebsd.org> ---
With both clang and gcc this line
> std::cout << std::wcout.getloc().name() << std::endl;
shows the locale in std::wcout defaults to "C" when it should default to the
current user's locale.

Without this std::wcout isn't usable from libraries because libraries have to
use the default state of std::wcout and it does not correspond to user's locale
without the top-level program setting it in std::wcout.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list