> Thank you for your answer. > > There are still issues offen however. > > >Dave wrote: > > >> Hello everyone, > >> > >> I'd like to know if there is any documentation of what the expected > >> behaviour of the numerous defines is? > > >There's nothing officially, although it would be nice to have. > > Im looking forward to it :)
I'm not sure if we'll get around to this anytime soon, so don't hold your breath! ;-) > >> More exactly I'd like to know more about: > >> XALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS > > >This means use the Xerces-C local code page transcoder rather than the > >ANSI C functions wcstombs and mbstowcs. This distinction will probably go > >away at some point, because we'll move to using the Xerces-C local code > >page transcoder exclusively. > > So which functions are used excatly instead of them? Is this directive the > only one if I want to work with the local transcoders? (For some reasons I > got Access Violation in the Xerces2_1_0.dll just before). Xerces-C has static global transcoder for the local code page. We use that on most platforms anyway, although we don't use it on Windows. If you're having problems because of an access violation, there may be a problem with your Xerces-C build, or you may not have initialized the library. > >> XALAN_USE_NATIVE_WCHAR_T > > >This is meant to be used on platforms where wchar_t is a proper type and > >is encoded in UTF-16. We aren't using this right now, because Xerces-C > >isn't consistent on how it uses wchar_t. > > Yes, I noticed that. There are some problems using Unicode (wchars). > > Can you say also a few words about XALAN_XALANDOMCHAR_USHORT_MISMATCH? That's an old define which is related to the other two defines. It is meant to indicate that wchar_t on a particular platform is not a 16-bit integral. The problem is these things came into the code in a pretty disorganized way and really ought to be cleaned up. This would lead to less confusion and much cleaner code. > Im also experiencing problems by appending to a null terminated wchars. Is > the size calculation ok? (there is a feeling that more memory then needed is > allocated). > > And last: which combination of #defines leads me to successful work with > wchars. Has anybody any (good;) )experience in using native wchar with > xalan? That's tricky because you need a version of Xerces-C where XMLCh is typedefed to wchar_t. If that happens, define XALAN_USE_NATIVE_WCHAR_T and you should be OK. Of course, all of this supposed you are on Windows, because native Unicode support on other platforms is dodgy at best, and wchar_t is not always Unicode. Dave
