R
Richard Herring
Ioannis Vranos said:Nope.
Yes, actually. German sz ligature is code point 223 in ISO8859-1,
better known as the Latin-1 character set, and was for example the
standard character set and encoding for HTML up to 3.2.
TC++PL says it well:
"A char variable is of the natural size to hold a character on a given
machine (typically a byte)".
And how many C++ implementations do you know of where char is less than
8 bits? ISO8859-1 has only 256 code points and can happily be
accommodated in 8-bit chars.
ISO/IEC 14882 says it better:
"Objects declared as characters (char) shall be large enough to store
any member of the implementation's basic character set."
.... and it's quite possible that that basic character set *is*
ISO8859-1.
"A type wchar_t is provided to hold characters of a larger character
set such as Unicode.
Yes. So what? ISO8859-1 is not Unicode, and wchar_t is not necessary to
hold it.
It is a distinct type. The size of wchar_t is implementation-defined
and large enough to hold the largest character set supported by the
implementation’s locale (see 21.7, C.3.3)."
To give an example, in Windows GUI applications, char is guaranteed to
work only for English characters, for any other language you should use
wchar_t.
Even if that were true (it isn't - there's an API for messing with
"code pages"), what does the Windows GUI have to do with standard C++?