Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2002 13:10:23 +0100 (CET)
From:      Tomas Pluskal <plusik@pohoda.cz>
To:        Garrett Wollman <wollman@lcs.mit.edu>
Cc:        freebsd-i18n@FreeBSD.ORG, <freebsd-bugs@FreeBSD.ORG>
Subject:   Re: multibyte(3) functions not working ?
Message-ID:  <20020309130309.H5448-100000@s096-n062.tele2.cz>
In-Reply-To: <200203082129.g28LTf644313@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


> They are broken.  (Or perhaps they are relying on new behavior in C99,
> but I rather doubt it.)

I am forwarding a message from Vlad Harchev <hvv@hippo.ru>:

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

 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

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

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. But the
character is not in ascii (latin1) table. There are many encodings which
contain this character, and all of them contain it as just one byte (as
Vlad said, singlebyte is also multibyte). So the function should return
the one byte character in one of the possible encodings, but which one ?
The current locale's encoding seems to me like a good choice.

Tomas Pluskal



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-i18n" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020309130309.H5448-100000>