Even on newer version of gcc (3.3.1), wchar_t is 32 bits, so it is not compatible with XMLCh. We had the same problem, our code has to run on multiple platforms. We have written conversion routines that convert from wstring to XMLCh and back for Unix platforms. On windows, both are 16 bit and compatible with each other.
-----Original Message----- From: Sylvain Duval [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 9:25 AM To: [EMAIL PROTECTED] Subject: RE: Encapsulation of XMLCh* string You are totally right and this is my problem. wstring is not defined in gcc 2.95.3 .... At 17:15 24/03/04 +0100, you wrote: >At 16.05 24/03/2004 +0000, you wrote: >>Hi, >> XMLCh is defined to be different things on different >>platforms. Can you be sure that it is always compatible with the >>wstring? There was some discussion on this a while ago, I don't >>remember the conclusion. > >XMLCh should now be always 16 bits (unsigned short), unless you >redefine >it. The problem is that wchar_t on some platform is 32 bits. And another >problem is that, in some STL implementations, std::wstring is not defined >(maybe it was gcc 2.95, but I don't recall it at the moment). >In the end, you can treat XMLCh as wchar_t and use it inside a CString or >a std::wstring if you know that your platform allows it (for CString is >easy, as it exists in just one platform) > >Alberto > > > >--------------------------------------------------------------------- >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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
