[Top][All Lists]

[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: Sat, 23 Oct 2010 19:07:27 +0000 (UTC)

Bruno Haible dixit:

>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.

setlocale() is a nop and thus never has side effects.

If an application wants to use iso-8859-1, it can do that, because the
encoding of the system is OPTU-8:

möp (latin1) = 0x6D 0xF6 0x70
↓ convert to wchar_t ↓
0x006D 0xEFF6 0x0070
↓ convert to char ↓
0x6D 0xF6 0x70

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]