[PATCH] Remove erroneous Uincode conversions from _wctomb_r and mbtowc_r

Jonathan S. Shapiro shap@eros-os.com
Tue Feb 24 18:22:00 GMT 2009


As background on this, there was a brief window of time when ISO stole
those ranges for use as application-defined code planes. This was
quickly recognized to have been a bad mistake, and that usage has been
withdrawn. Code points falling outside the [0x0,0x10ffff] range are
errors.

On Tue, Feb 24, 2009 at 4:26 AM, Corinna Vinschen <vinschen@redhat.com> wrote:
> Ping?
>
> On Feb 17 18:49, Corinna Vinschen wrote:
>> Hi,
>>
>> the conversion functions _wctomb_r and _mbtowc_r convert 5 and 6 byte
>> UTF-8 sequences into a wchar counterpart.  Vice versa, wchar_t values >
>> 0x10ffff are converted to 4, 5 and 6 byte UTF-8 sequences.  However, per
>> the Unicode standard (http://www.unicode.org/standard/standard.html),
>> these values are invalid.  Unicode is restricted to the value range
>> 0x000000 to 0x10ffff.  Any character outside this range has to be
>> treated as invalid.



More information about the Newlib mailing list