[Bug 209617] wctomb() is completely broken when UTF-8 locales are used

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed May 18 18:07:47 UTC 2016


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

            Bug ID: 209617
           Summary: wctomb() is completely broken when UTF-8 locales are
                    used
           Product: Base System
           Version: 10.3-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: jau at iki.fi

For any and all unicode code points larger than 0xff wctomb() returns -1
and sets errno to EILSEQ when LC_CTYPE is set to a UTF-8 locale.

Another symptom of something going wrong is that the proper UTF-8 encoding
for code point 0xff would be two bytes 11000011 10111111, but wctomb() just
passes it through as one byte 11111111 with no conversion.

I noticed this on FreeBSD 10.3-STABLE r299892 on amd64.

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


More information about the freebsd-bugs mailing list