This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Fix UTF-16 surrogate handling in __utf8_mbtowc
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Tue, 28 Jul 2009 19:06:27 +0200
- Subject: Re: [PATCH] Fix UTF-16 surrogate handling in __utf8_mbtowc
- References: <20090728165730.GV18621@calimero.vinschen.de>
- Reply-to: newlib at sourceware dot org
On Jul 28 18:57, Corinna Vinschen wrote:
> The downside of this implementation is that an application could be
> happy with the result after only having read the first three bytes
> of the four byte sequence from the input string and just stop. This
> results in an incomplete surrogate pair. However, as far as I can see
> it's rather unlikely, and it's still better that not handling Unicode
> values outside the base plane at all.
Oh, btw, the same could of course already happen with the old
implementation, so that's not a regression.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat