[Bug 251674] std::wcout doesn't print unicode wide characters

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Dec 7 22:45:27 UTC 2020


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

            Bug ID: 251674
           Summary: std::wcout doesn't print unicode wide characters
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: yuri at freebsd.org

Testcase:
> #include <iostream>
> #include <locale.h>
> 
> int main() {
>         //setlocale(LC_ALL, "C.UTF-8");
>         setlocale(LC_ALL, "en_US.UTF-8");
>         std::wcout << L'>' << L'◯' << L'<' << std::endl;
> }

> $ c++ test-wchar.cpp && ./a.out
> >$ 

It doesn't print the "large circle" unicode character U+25EF and the next char.

Replacing the function body with:
> printf("◯\n");
prints the circle, so the problem is in std::wcout.

Console's locale is en_US.UTF-8:
> $ env | grep LC
> LC_CTYPE=en_US.UTF-8
> LC_ALL=en_US.UTF-8


12.2-STABLE r366720

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


More information about the freebsd-bugs mailing list