Christoph Rohland writes:
> Yes, but perhaps we could try to make that standard?
There is a chance to make the u"..." syntax(es) standard.
Personally I don't think it is possible to standardize the way a
compiler detects the encoding of an input file. Some, like gcc, will
want to use UTF-8 as the default, some others will want to use the
locale encoding.
> > (Can't we use uint_least16_t instead of utf16_t?)
>
> No, I think one of the biggest mistakes in the C standard is that
> char/wchar_t is not fixed. We need an exact 16 bit type with a defined
> encoding.
Joseph Myers explained why you won't get such a type (and why ISO C 99
section 7.18.1.1.(3) says that uint8_t, uint16_t and uint32_t are
optional): Some hardware has a word size of 9, 16, 32, or 36 bit, and
GCC and C99 support such hardware.
> > Currently only on glibc systems. wchar_t == UCS-4 is only a
> > recommendation in ISO C 99, not mandatory (unfortunately).
>
> No, it will be on all Unix systems we support: Solaris, True64,
> HPUX, AIX5L, Reliant.
Did you get a firm confirmation from Sun people that in some version
of Solaris, wchar_t will be UCS-4 in all locales and __STDC_ISO10646__
will be defined? In which version of Solaris?
Bruno
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/