Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: assume "enhanced goodness" when --multibyte-enable
- X-seq: zsh-workers 22083
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: assume "enhanced goodness" when --multibyte-enable
- Date: Thu, 15 Dec 2005 11:52:02 +0000 (GMT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kjdlj4SjiuP2k6r/6s/GxTOg8Tl2Y8u2MvcZco3q0L/b+ed+kemIh36no4R/XN+dzV8GaFzr5gImlKxLvwXqXwShv4FDIv+E0yWBjidSqg6dJ4Zhoa/DyFW3V5j7lqIOpUcSOiFU85pc85LxuMxpIV88j7moCy5zH5YbxfuId0U= ;
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Peter wrote:
> In utils.c we don't enable the full multibyte code for converting
> characters unless __STDC_ISO_10646__ is turned on. However,
everywhere
> in zle we simply trust that if --multibyte-enable is turned on
> everything just works. That includes wctomb(), which is all we need
> for character conversion.
This doesn't make sense to me. With MULTIBYTE_SUPPORT enabled are you
just assuming that wchar_t is UCS-4 everywhere? I don't understand how
that'll work if you have a system which has perfectly good multibyte
support but uses some other encoding for wchar_t. I think FreeBSD is
such a system and older versions of many Unix systems do that. Do you
actually know for sure that Solaris 8 is using UCS-4 for wchar_t? The
fact the it doesn't define __STDC_ISO_10646__ would imply that it does
not. I'd suspect it is similar but different which is why it sort-of
seems to work.
(The code in utils.c which you have just enabled with MULTIBYTE_SUPPORT
casts a 4 byte integer into a wchar_t: something that can only work
when wchar_t is implemented as UCS-4. __STDC_ISO_10646__ is supposed a
reliable way to determine if wchar_t is UCS-4)
Oliver
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author