Revise the Mac OS Transcoder to use the Mac Text Encoding Converter,
rather than the previously used Unicode Converter. The TEC allows transcoding between a broader variety of encoding formats, while the unicode converter converts only to and from Unicode. This change allows us to use UTF-8 as the Local Code Page if we choose. In this version, pending further feedback, I've changed the LCP to UTF-8 if Xerces is running on Mac OS X. This provides explicit support for running Xerces samples off the command line, when the character set encoding in the terminal is UTF-8, and is consistent with other unix tools that expect parameters in UTF-8. As part of re-implementing the transcoder, I've also simplified it: - I took out support for size mismatch between XMLCh and UniChar. This version assumes XMLCh will always be 16-bit UTF-16. - The LCP transcoder is now completely generic. It is implemented strictly in terms of the virtual transcoder interface. As such, any XMLTranscoder can be passed in as the transcoder to fullfill the LCP transcoding. Additionally, since LCP transcoders are used globally, I added a mutex that serializes use of the LCP transcoder such that it can be actively used in only one thread at a time. Feedback is welcomed. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175793 13f79535-47bb-0310-9956-ffa450edef68
Showing
- src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp 3 additions, 0 deletionssrc/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp
- src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp 1 addition, 0 deletionssrc/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp
- src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp 367 additions, 664 deletions...anscoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
- src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.hpp 24 additions, 7 deletions...anscoders/MacOSUnicodeConverter/MacOSUnicodeConverter.hpp
Loading
Please register or sign in to comment