[Bug 225692] iswprint() wrong for some FULL WIDTH characters in UTF-8 locale

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 21 10:03:02 UTC 2018


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

Hank Hampel <freebsd at niamodnikufesin.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |freebsd at niamodnikufesin.de

--- Comment #11 from Hank Hampel <freebsd at niamodnikufesin.de> ---
I quickly wanted to add that this problem probably affects everybody using mosh
(https://mosh.org/) - or any other remote shell that relies on the server
interpreting characters - and powerline-status
(https://github.com/powerline/powerline) or other programs using Unicode
characters.

SSH notably doesn't rely on the server interpreting the characters otherwise
the outcry for this regression would have probably been much greater. Please
note well that the above worked flawlessly for FreeBSD 10.x-RELEASE - which is
especially frustrating.

The thing that makes this bug even worse is that there are obviously "holes" in
the Unicode coverage of the UTF-8 locales so that some Unicode characters work
fine while others are impossible to use - which makes this problem only harder
to debug for users.

As a quick test you can put the following lines (taken from powerline-status)
into a file and copy it onto a FreeBSD 11.x-RELEASE machine and log onto it via
mosh and you'll see empty strings instead of the Unicode chars which in turn
runs havoc on your input line if used as a shell prompt (PS1) as the length is
calculated wrongly.

        "dividers": {
                "left": {
                        "hard": " ",
                        "soft": " "
                },
                "right": {
                        "hard": " ",
                        "soft": " "
                }
        },

Thanks everybody for looking into this problem and fixing the associated
regression!

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


More information about the freebsd-bugs mailing list