Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: assume "enhanced goodness" when --multibyte-enable



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