[Bug 251674] libc++: std::wcout does not use global locale set via setlocale()

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 8 06:46:59 UTC 2020


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

Yuri Pankov <yuripv at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dim at FreeBSD.org
            Summary|std::wcout doesn't print    |libc++: std::wcout does not
                   |unicode wide characters:    |use global locale set via
                   |std::wcout defaults to "C"  |setlocale()
                   |locale, not to user's       |
                   |locale                      |

--- Comment #7 from Yuri Pankov <yuripv at FreeBSD.org> ---
(In reply to Yuri Victorovich from comment #6)
Everything (well, almost) defaults to C locale, including printf(), e.g. the
following will fail without setlocale() call:

    printf("printf=%C\n", L'◯');

And it looks like the problem is that libc++'s wcout does NOT use the global
locale set via that call, while libstdc++'s one does.  Whether it is a bug or
deliberate choice, I have no idea.

Dimitry, any thoughts?

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


More information about the freebsd-bugs mailing list