Date: Thu, 15 Nov 2018 21:24:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 233244] mbtowc and wctomb are broken for all single-byte locales (except for C) Message-ID: <bug-233244-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233244 Bug ID: 233244 Summary: mbtowc and wctomb are broken for all single-byte locales (except for C) Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: yuripv@FreeBSD.org Looking at bug #211762, I noticed that mbtowc() and wctomb() don't do any conversion when LC_CTYPE is a single-byte locale (e.g. lv_LV.ISO8859-13 or ru_RU.KOI8-R), and simply fill the output buffer with the input value. POSIX defines mbtowc, for example, as "mbtowc - convert a character to a wide-character code", and "The behavior of this function is affected by the LC_CTYPE category of the current locale.", so there's nothing pointing to single-byte locales being any special and not requiring conversion. glibc (as found in Debian GNU/Linux) correctly converts characters from single-byte-locales-other-than-C to corresponding wide ones. OTOH, single-byte locales are losing their significance, and fixing this could be just not worth the effort required for testing the changes, more so as this doesn't seem to be reported previously. -- 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-233244-227>
