Marcin 'Qrczak' Kowalczyk wrote on 2000-08-08 13:47 UTC:
> C99 recommends that a C implementation
> defines __STDC_ISO_10646__ if wchar_t is Unicode but gcc + glibc-2.1.3
> don't define it, so this detection is impractical.

No, it's not, because glibc-2.1.3 doesn't provide that functionality yet
(implementation of all the wchar_t functions and multibyte locales).

       __STDC_ISO_10646__ An integer constant of the  form  yyyymmL
                (for  example,  199712L), intended to indicate that
                values   of   type   wchar_t    are    the    coded
                representations   of   the  characters  defined  by
                ISO/IEC 10646,  along  with  all   amendments   and
                technical  corrigenda  as of the specified year and
                month.

So starting with glibc 2.2, you should find in __STDC_ISO_10646__ a
value > 200000L to indicate that Unicode 3.0 is now supported in
wchar_t. Sounds like a reasonably portable arrangement to me.

[Unfortunately, glibc 2.1.91 seems to have forgotten to define it
though. I hope Ulrich can fix this quickly, I just sent him a bug
report.]

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to