Re: broken i18n printing in gedit and gnumeric



Just forwarding some BSD replies:

==========================================================================

<<On Sat, 9 Mar 2002 13:10:23 +0100 (CET), Tomas Pluskal
<plusik pohoda cz> said:

I have a simple question: according to man pages, the wctomb() function
should convert wide-char to its multibyte equivalent. When I pass a
wide-char (like any non-latin1 character, for example 0x161 in unicode)
to
this function, it should return its multibyte equivalent.

In the case of the ISO 8859-2 repertoire, all of the wide characters
are the same as the narrow characters are the same as the multibyte
characters, so wctomb() should not change the value of its argument at
all.  Somehow, someone has gotten the bizarre idea that wide
characters are automatically ISO 10646 -- this is simply not true.
(See, e.g., JIS X0208.)  The wide character repertoire, like the
multibyte encoding, is locale-specific.

-GAWollman

===========================================================================

(See, e.g., JIS X0208.)  The wide character repertoire, like the
multibyte encoding, is locale-specific.

As POSIX says:

"wchar_t

Integer type whose range of values can represent distinct wide-character
codes for all members of the largest character set specified among the
locales supported by the compilation environment: the null character has
the code value 0 and each member of the portable character set has a code
value equal to its value when used as the lone character in an integer
character constant."

It supposes that wchar_t _may_ be locale-specific so treating it as
Unicode in all cases is plain wrong.

-- 
Andrey A. Chernov

===========================================================================


I hope the truth is out there :)

Tomas Pluskal


On Sat, 9 Mar 2002, Vlad Harchev wrote:

On Sat, 9 Mar 2002, Tomas Pluskal wrote:

 Hi,

 I believe BSD guys are just wrong.
 There is no trace in any specs (I checked Unix98 specs) that mbstowcs and
friends should work only for multibyte encodings. So it should be treated as
"should work for any encoding". It's also obvious that singlebyte encoding can
be considered multibyte (but without shift states) - so their statement could
work against themselves.

 BSD guys should fix locale support in their libc or modify all my patches not
to use some other portable and working way (probably using iconv(3)).

 I won't help with this for free.

 Best regards,
  -Vlad






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