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

Re: zsh doesn't understand some multibyte characters

On 5/13/15 4:20 PM, Bart Schaefer wrote:
> On May 13, 11:29am, Danek Duvall wrote:
> }
> } I'm less sure what to do about __STDC_ISO_10646__.  I see that most of the
> } places it's checked you're also checking for __APPLE__, but not all of them
> } (and I'm not sure why that would be).
> } 
> } I can talk to our globalization folks who might know why this isn't
> } defined, or what it should be set to, or whatever, and file a bug if
> } necessary.
> You've hit the limit of my knowledge on this point, I'm afraid.  Someone
> else will have to chime in about __STDC_ISO_10646__.

That constant has to be defined by the implementation (compiler+libraries).
If it's defined -- and it's defined to a date -- it means that wchar_t
values are unicode values, as ISO/IEC 10646 defines them on that date,
regardless of the locale.  Practically, this means that you can convert a
32-bit character value to a multibyte character just by calling, for
example, wctomb, and not have to use something like iconv to convert
between locales.  No application should be defining that macro itself.

``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@xxxxxxxx    http://cnswww.cns.cwru.edu/~chet/

Messages sorted by: Reverse Date, Date, Thread, Author