It will work. However, if your system's wchar_t expects UTF-32/UCS-4 type
Unicode, i.e. 32 bit size chars, you will get into trouble if any of the
text you parse creates surrogates. A 32 bit Unicode system never expects to
see surrogate pairs, because it doesn't need them. The parser itself will
work, since it doesn't much care. But if you pass any of that text to any
wide character system call, it might barf. The reason being that the parser
just spits out UTF-16, no matter what. You can store that UTF-16 into 32 bit
wchar_t characters, but it will also store surrogate pairs as two characters
instead of as one.

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: Majeed, Zartaj [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:12 AM
To: [EMAIL PROTECTED]
Subject: Can I typedef XMLCh for wchar_t on Solaris?


I would like to build libxerces-c1_4.so with XMLCh typedef'd for wchar_t
instead of unsigned short. I'd like to know if that is a safe change to make
in
util/Compilers/SunCCDefs.hpp?

I need to do this to avoid conversions between wide strings and DOM_Strings
in my Solaris CC application. I expect my typedef to be okay as long as
xerces 
does not internally make any assumptions about the type of XMLCh besides it
being 
large enough to store UTF-16 values.

Thanks,
Zartaj

---------------------------------------------------------------------
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]

Reply via email to