[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MirBSD mbtowc bug? failure on test-wcrtomb

From: Bruno Haible
Subject: Re: MirBSD mbtowc bug? failure on test-wcrtomb
Date: Sat, 23 Oct 2010 20:55:38 +0200
User-agent: KMail/1.9.9

Thorsten Glaser wrote:
> >Do you also "canonicalize" en_US.ISO8859-1 to en_US.UTF-8? This would be
> >an even bigger bug, because the UTF-8 encoding is not the same nor an 
> >extension
> >of the requested ISO-8859-1 encoding.
> In MirBSD, there is exactly one encoding, called “OPTU-8” internally,
> which looks like UTF-8

So, when the caller specifies an encoding such as ISO8859-1 in the argument,
your setlocale() implementation ought to return NULL and have no side-effects.
The current behaviour of setting the locale to "C" in that case is just broken.

The spec of setlocale() is not that long to read:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]