Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 23:18:02 +0300
From:      "Jukka A. Ukkonen" <jau789@gmail.com>
To:        freebsd-amd64@freebsd.org
Subject:   wctomb() failing unexpectedly
Message-ID:  <b75d78e4-2cf0-87b6-67d2-037428bddae8@gmail.com>

next in thread | raw e-mail | index | archive | help

Has anyone else noticed that wctomb() returns -1
and sets errno to EILSEQ on any and all unicode
code points larger than 0xff when LC_CTYPE is
set to any UTF-8 locale?
Another symptom of something going wrong is that
proper UTF-8 encoding for code point 0xff would be
two bytes 11000011 10111111, but wctomb() returns
it simply as one byte 11111111.
I noticed this on FreeBSD 10.3-STABLE r299892.
The same thing might happen on other platforms as
well, but I just don't know it yet.

--jau



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b75d78e4-2cf0-87b6-67d2-037428bddae8>