bug-gnulib
[Top][All Lists]
Advanced

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

Re: MirBSD mbtowc bug? failure on test-wcrtomb


From: Thorsten Glaser
Subject: Re: MirBSD mbtowc bug? failure on test-wcrtomb
Date: Sun, 24 Oct 2010 00:20:06 +0000 (UTC)

Bruno Haible dixit:

>This cannot work in the way users expect.

Yes.

>1) The conversion from ISO-8859-1 to wchar_t may misinterpret some sequences
>   of characters (namely those that happen to look like valid UTF-8,
>   such as 0x31 0xD7 0xBD ("1×½").

Users must use UTF-8 on MirBSD, the other supported thing is 7-bit (but
8-bit transparent) ASCII. No support for legacy codepages exists, nor
will there be any.

>2) The <ctype.h> and <wctype.h> functions cannot work. For example, in
>   ISO-8859-1 encoding, toupper(0xF6) = 0xD6. Whereas in ISO-8859-5,
>   toupper(0xF6) = 0xA6. You cannot have both in the same locale.

The ctype macros operate on ASCII, the others on OPTU-16.

>In summary, your system does NOT support ISO-8859-* locales, and therefore

Yes.

>a minimally POSIX compliant setlocale() function ought to return NULL when
>asked to set such a locale.

But the system doesn’t even know about charsets.

I’ll read through the POSIX description and see whether I can change
that, though, when I come to it. But that will not help you because
it has been like this for a long time, only for future systems…

bye,
//mirabilos
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt



reply via email to

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