Steven T. Hatton wrote:
On Thursday 09 March 2006 02:08, David Bertoni wrote:
What does this simply program output on your system and compiler?
wchar_t is 32 bits on my system. I believe that a 16 bit storage unit will
under normal circumstances occupy a 32 bit memory location, but only use half
of it.
Yes, and don't you think that's rather wasteful? Would you use Xerces-C
to process large XML documents if you knew it was wasting half of its
character string storage just so it could use wchar_t on all platforms?
I'm not sure anyone has ever said that Xerces-C and Linux wchar_t "don't
get along." The problem is that Xerces-C encodes string data in UTF-16
internally, and using wchar_t to hold UTF-16 code points is not portable.
Why does Xerces-C use a non-standard data type?
unsigned short is not a non-standard type. You may think it's
"non-standard" for holding character data, but Xerces-C encodes
character data in UTF-16 code units, and that requires a 16-bit integral
type.
If my implementation doesn't support a particular locale, and
> therefore does not use a 16 bit or larger data type, then what are the
> chances that I would use Xerces-C to support such a character set?
You've got it backwards -- Xerces-C only support the current locale's
character set in a very limited fashion, by providing a way to transcode
UTF-16 strings to character strings in the current locale. Otherwise,
it operates internally exclusively in UTF-16, and it is unaffected by
the current locale or how the system encodes char or wchar_t.
Dave
Steven
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]