Fix localedef collation handling of <U0000> (bug 15948)
Joseph S. Myers
joseph@codesourcery.com
Tue Sep 24 22:05:00 GMT 2013
On Tue, 24 Sep 2013, Roland McGrath wrote:
> > as can be seen by adding "assert (runp->nwcs > 0);" before that code,
>
> So add that assert.
>
> > This patch causes such a sequence to be treated as length 1 instead.
>
> This seems reasonable on its face. But I don't understand enough about the
> context to be sure how this case comes about or what it ought to mean.
> It would be much easier to evaluate with an example of how the case occurs.
The examples are the cases where the assertion fails - such as
ar_SA.UTF-8. I don't know *why* locales/ar_SA includes <U0000> in
LC_COLLATE (more generally, I'm not sure how much individual locales need
their own collation information at all, as opposed to using the ISO 14651
information, which, as noted in bug 14095, could do with someone figuring
out how to update it), but it's the appearance of collation information
for <U0000> in the locale sources that triggers this problem.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list