[Python-Dev] String encoding

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
2000年5月28日 08:28:55 +0200


Fred L. Drake wrote
> I recall a fair bit of discussion about wchar_t when it was
> introduced to ANSI C, and the character set and encoding were
> specifically not made part of the specification. Making a
> requirement that wchar_t be Unicode doesn't make a lot of sense, and
> opens up potential portability issues.

In ISO (!) C99, an implementation may define __STDC_ISO_10646__ to
indicate that wchar_t is Unicode. The exact wording is
# A decimal 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.
Of course, at the moment, there are few, if any, implementations that
define this macro.
Regards,
Martin

AltStyle によって変換されたページ (->オリジナル) /