Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Dec 2020 22:45:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 251674] std::wcout doesn't print unicode wide characters
Message-ID:  <bug-251674-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251674

            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@FreeBSD.org
          Reporter: yuri@freebsd.org

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

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

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

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

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


12.2-STABLE r366720

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251674-227>