Skip to content
Snippets Groups Projects
Commit 54480469 authored by James David Berry's avatar James David Berry
Browse files

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
parent ffd06de3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment