You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ro...@locus.apache.org on 2000/03/18 01:00:06 UTC
cvs commit: xml-xerces/c/src/validators/DTD DTDValidator.cpp MixedContentModel.cpp
roddey 00/03/17 16:00:05
Modified: c/src/NLS/EN_US XMLErrList_EN_US.Xml
c/src/internal XMLReader.cpp
c/src/util TransService.cpp TransService.hpp
XML88591Transcoder.cpp XML88591Transcoder.hpp
XMLASCIITranscoder.cpp XMLASCIITranscoder.hpp
XMLChTranscoder.cpp XMLChTranscoder.hpp
XMLEBCDICTranscoder.cpp XMLEBCDICTranscoder.hpp
XMLExceptMsgs.hpp XMLIBM1140Transcoder.cpp
XMLIBM1140Transcoder.hpp XMLUCS4Transcoder.hpp
XMLUCSTranscoder.cpp XMLURL.cpp
XMLUTF16Transcoder.cpp XMLUTF16Transcoder.hpp
XMLUTF8Transcoder.cpp XMLUTF8Transcoder.hpp
XMLWin1252Transcoder.cpp XMLWin1252Transcoder.hpp
c/src/util/MsgLoaders/InMemory CppErrMsgs_EN_US.hpp
c/src/util/MsgLoaders/MsgCatalog XMLMsgCat_EN_US.Msg
c/src/util/Platforms/AIX AIXPlatformUtils.cpp
c/src/util/Platforms/HPUX HPPlatformUtils.cpp
c/src/util/Platforms/Linux LinuxPlatformUtils.cpp
c/src/util/Platforms/OS390 OS390PlatformUtils.cpp
c/src/util/Platforms/OS400 OS400PlatformUtils.cpp
c/src/util/Platforms/Solaris SolarisPlatformUtils.cpp
c/src/util/Platforms/Win32 Version.rc Win32PlatformUtils.cpp
c/src/util/Transcoders/ICU ICUTransService.cpp
ICUTransService.hpp
c/src/util/Transcoders/Win32 Win32TransService.cpp
Win32TransService.hpp Win32TransService2.cpp
c/src/validators/DTD DTDValidator.cpp MixedContentModel.cpp
Log:
Initial updates for two way transcoding support
Revision Changes Path
1.8 +11 -5 xml-xerces/c/src/NLS/EN_US/XMLErrList_EN_US.Xml
Index: XMLErrList_EN_US.Xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/NLS/EN_US/XMLErrList_EN_US.Xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XMLErrList_EN_US.Xml 2000/02/14 19:27:41 1.7
+++ XMLErrList_EN_US.Xml 2000/03/17 23:59:53 1.8
@@ -185,6 +185,8 @@
<Message Id="CM_UnaryOpHadBinType" Text="The unary operation node had a binary node type"/>
<Message Id="CM_UnknownCMType" Text="Unknown content model type"/>
<Message Id="CM_UnknownCMSpecType" Text="Unknown content spec type"/>
+ <Message Id="CM_NoParentCSN" Text="The parent element has no content spec node"/>
+ <Message Id="DTD_UnknownCreateReason" Text="The creation reason enum has an unknown value"/>
<Message Id="ElemStack_EmptyStack" Text="The element stack is empty"/>
<Message Id="ElemStack_BadIndex" Text="The element stack index given was beyond the stack top"/>
<Message Id="ElemStack_StackUnderflow" Text="The element stack was already empty when a pop request occured"/>
@@ -200,6 +202,7 @@
<Message Id="File_CouldNotResetFile" Text="Could not reset file to beginning"/>
<Message Id="File_CouldNotGetSize" Text="Could not acertain the file size"/>
<Message Id="File_CouldNotGetBasePathName" Text="Could not determine base pathname of the file"/>
+ <Message Id="File_BasePathUnderflow" Text="The base path had too few levels to weave in relative part"/>
<Message Id="Gen_ParseInProgress" Text="Parse may not be called while parsing"/>
<Message Id="Gen_NoDTDValidator" Text="A DOCTYPE was seen but the installed validator does not understand DTDs"/>
<Message Id="Gen_CouldNotOpenDTD" Text="Could not open DTD file '{0}'"/>
@@ -223,8 +226,6 @@
<Message Id="Reader_CantCreateCvtrFor" Text="Could not create a converter for encoding: {0}"/>
<Message Id="Reader_CouldNotDecodeFirstLine" Text="Could not decode first line of entity: {0}"/>
<Message Id="Reader_EOIInMultiSeq" Text="End of input was hit in the middle of a multibyte sequence"/>
- <Message Id="Reader_BadUTF8Seq" Text="Invalid second byte of a UTF-8 character sequence"/>
- <Message Id="Reader_BadSurrogateInUTF8" Text="Invalid surrogate character found in UTF-8 data"/>
<Message Id="Reader_SrcOfsNotSupported" Text="The current transcoding service does not support source offset information"/>
<Message Id="Reader_EncodingStrRequired" Text="EBCDIC files must provide an encoding= string"/>
<Message Id="Scan_CouldNotOpenSource" Text="The primary document entity could not be opened. Id={0}"/>
@@ -240,11 +241,14 @@
<Message Id="Strm_StdOutWriteFailure" Text="Could not write to standard out"/>
<Message Id="Strm_ConWriteFailure" Text="Could not write to console"/>
<Message Id="StrPool_IllegalId" Text="String pool id was not legal"/>
- <Message Id="Trans_CouldNotXCodeXMLData" Text="The block of XML data could not be transcoded"/>
<Message Id="Trans_CouldNotCreateDefCvtr" Text="Could not create a default transcoder"/>
<Message Id="Trans_InvalidSizeReq" Text="The maximum size to xlat is larger than the declared block size"/>
- <Message Id="Trans_Unrepresentable" Text="Got an representable code point for encoding {0}"/>
- <Message Id="Trans_NotInSourceSet" Text="A source character was not in the code point set for encoding {0}"/>
+ <Message Id="Trans_Unrepresentable" Text="Unicode char {0} is representable in encoding {1}"/>
+ <Message Id="Trans_NotValidForEncoding" Text="Character {0} is not valid for encoding {1}"/>
+ <Message Id="Trans_BadBlockSize" Text="The requested block size is not equal to the size set during construction"/>
+ <Message Id="Trans_BadSrcSeq" Text="An invalid multi-byte source text sequence was encountered"/>
+ <Message Id="Trans_BadSrcCP" Text="{0} is not a valid value for encoding {1}"/>
+ <Message Id="Trans_BadTrailingSurrogate" Text="Leading surrogate was not followed by trailing"/>
<Message Id="URL_MalformedURL" Text="The URL was not correctly formed"/>
<Message Id="URL_UnsupportedProto" Text="The URL used an unsupported protocol"/>
<Message Id="URL_UnsupportedProto1" Text="Unsupported URL protocol: '{0}'"/>
@@ -253,6 +257,8 @@
<Message Id="URL_ExpectingTwoSlashes" Text="Expected // after protocol"/>
<Message Id="URL_IncorrectEscapedCharRef" Text="% must be followed by two hex digits"/>
<Message Id="URL_UnterminatedHostComponent" Text="Unterminated host component"/>
+ <Message Id="URL_RelativeBaseURL" Text="The base part of the URL cannot be relative"/>
+ <Message Id="URL_BaseUnderflow" Text="The base part has too few levels to weave in relative part"/>
<Message Id="Vector_BadIndex" Text="The passed index is past the end of the vector"/>
<Message Id="Val_InvalidElemId" Text="The element id was invalid"/>
<Message Id="Val_CantHaveIntSS" Text="When reusing the validator, no internal subset is allowed"/>
1.11 +7 -2 xml-xerces/c/src/internal/XMLReader.cpp
Index: XMLReader.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/internal/XMLReader.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XMLReader.cpp 2000/03/02 19:54:29 1.10
+++ XMLReader.cpp 2000/03/17 23:59:53 1.11
@@ -56,6 +56,9 @@
/*
* $Log: XMLReader.cpp,v $
+ * Revision 1.11 2000/03/17 23:59:53 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.10 2000/03/02 19:54:29 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -1694,9 +1697,9 @@
return 0;
}
- // Ask the transcoder to do another batch
+ // Ask the transcoder to internalize another batch of chars
unsigned int bytesEaten;
- const unsigned int charsDone = fTranscoder->transcodeXML
+ const unsigned int charsDone = fTranscoder->transcodeFrom
(
&fRawByteBuf[fRawBufIndex]
, fRawBytesAvail - fRawBufIndex
1.15 +2 -6 xml-xerces/c/src/util/TransService.cpp
Index: TransService.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/TransService.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TransService.cpp 2000/02/22 22:01:21 1.14
+++ TransService.cpp 2000/03/17 23:59:54 1.15
@@ -223,13 +223,9 @@
// ---------------------------------------------------------------------------
void XMLTranscoder::checkBlockSize(const unsigned int toCheck)
{
- if (toCheck > fBlockSize)
- {
- // <TBD> Throw an exception here
- }
+// if (toCheck > fBlockSize)
+// ThrowXML(TranscodingException, XMLExcepts::Trans_BadBlockSize);
}
-
-
// ---------------------------------------------------------------------------
1.9 +55 -24 xml-xerces/c/src/util/TransService.hpp
Index: TransService.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/TransService.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TransService.hpp 2000/03/02 19:54:46 1.8
+++ TransService.hpp 2000/03/17 23:59:54 1.9
@@ -56,6 +56,9 @@
/*
* $Log: TransService.hpp,v $
+ * Revision 1.9 2000/03/17 23:59:54 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.8 2000/03/02 19:54:46 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -128,6 +131,12 @@
, SupportFilesNotFound
};
+ struct TransRec
+ {
+ XMLCh intCh;
+ XMLByte extCh;
+ };
+
// -----------------------------------------------------------------------
// Public constructors and destructor
@@ -209,27 +218,33 @@
//
-// There are two levels of transcoding required by the parser system. One
-// is used for transcoding raw binary data from XML source into the
-// internalized Unicode format. These also always take an encoding name
-// and are intended to work for arbritrary encodings.
-//
-// The other level of transcoding involves transcoding to and from the
-// local code page. These are used more generally throughout the system
-// to make XMLCh data displayable on the local host, or to internalize
-// local code page strings passed into the parser from client code. These
-// don't take an encoding name, but are just created by the transcoding
-// service for the appopriate local code page encoding.
-//
-// The basic level of transcoding is implemented in XMLTranscoder. The
-// local code version is implemented in XMLLCPTranscoder. The purpose of
-// this distinction is that there are a set of intrinsically supported
-// encodings which only want to implement the basic transcoding interface.
+// This type of transcoder is for non-local code page encodings, i.e.
+// named encodings. These are used internally by the scanner to internalize
+// raw XML into the internal Unicode format, and by writer classes to
+// convert that internal Unicode format (which comes out of the parser)
+// back out to a format that the receiving client code wants to use.
//
class XMLUTIL_EXPORT XMLTranscoder
{
public :
// -----------------------------------------------------------------------
+ // This enum is used by the transcodeTo() method to indicate how to
+ // react to unrepresentable characters. The transcodeFrom() method always
+ // works the same. It will consider any invalid data to be an error and
+ // throw.
+ //
+ // The options mean:
+ // Throw - Throw an exception
+ // RepChar - Use the replacement char
+ // -----------------------------------------------------------------------
+ enum UnRepOpts
+ {
+ UnRep_Throw
+ , UnRep_RepChar
+ };
+
+
+ // -----------------------------------------------------------------------
// Public constructors and destructor
// -----------------------------------------------------------------------
virtual ~XMLTranscoder();
@@ -238,15 +253,8 @@
// -----------------------------------------------------------------------
// The virtual transcoding interface
// -----------------------------------------------------------------------
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- ) = 0;
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -255,6 +263,21 @@
, unsigned char* const charSizes
) = 0;
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ ) = 0;
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const = 0;
+
// -----------------------------------------------------------------------
// Getter methods
@@ -307,6 +330,12 @@
};
+//
+// This class is a specialized transcoder that only transcodes between
+// the internal XMLCh format and the local code page. It is specialized
+// for the very common job of translating data from the client app's
+// native code page to the internal format and vice versa.
+//
class XMLUTIL_EXPORT XMLLCPTranscoder
{
public :
1.4 +77 -32 xml-xerces/c/src/util/XML88591Transcoder.cpp
Index: XML88591Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XML88591Transcoder.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XML88591Transcoder.cpp 2000/03/02 19:54:47 1.3
+++ XML88591Transcoder.cpp 2000/03/17 23:59:54 1.4
@@ -58,8 +58,9 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-#include <util/XML88591Transcoder.hpp>
#include <util/TranscodingException.hpp>
+#include <util/XML88591Transcoder.hpp>
+#include <util/XMLString.hpp>
#include <memory.h>
@@ -83,37 +84,13 @@
// ---------------------------------------------------------------------------
// XML88591Transcoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XML88591Transcoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XML88591Transcoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If not enough source bytes, return zero
- if (!srcBytes)
- return 0;
-
- // We are going to eat one byte
- bytesEaten = 1;
-
- // And return the value, cast to an XMLCh
- return XMLCh(*srcData);
-}
-
-
unsigned int
-XML88591Transcoder::transcodeXML(const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
+XML88591Transcoder::transcodeFrom( const XMLByte* const srcData
+ , const unsigned int srcCount
+ , XMLCh* const toFill
+ , const unsigned int maxChars
+ , unsigned int& bytesEaten
+ , unsigned char* const charSizes)
{
// If debugging, make sure that the block size is legal
#if defined(XERCES_DEBUG)
@@ -122,7 +99,7 @@
//
// Calculate the max chars we can do here. Its the lesser of the
- // max output chars and the number of chars in the source.
+ // max output chars and the number of bytes in the source.
//
const unsigned int countToDo = srcCount < maxChars ? srcCount : maxChars;
@@ -142,4 +119,72 @@
// Return the chars we transcoded
return countToDo;
+}
+
+
+unsigned int
+XML88591Transcoder::transcodeTo(const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // If debugging, make sure that the block size is legal
+ #if defined(XERCES_DEBUG)
+ checkBlockSize(maxBytes);
+ #endif
+
+ //
+ // Calculate the max chars we can do here. Its the lesser of the
+ // max output bytes and the number of chars in the source.
+ //
+ const unsigned int countToDo = srcCount < maxBytes ? srcCount : maxBytes;
+
+ //
+ // Loop through the bytes to do and convert over each byte. Its just
+ // a downcast of the wide char, checking for unrepresentable chars.
+ //
+ const XMLCh* srcPtr = srcData;
+ const XMLCh* srcEnd = srcPtr + countToDo;
+ XMLByte* destPtr = toFill;
+ while (srcPtr < srcEnd)
+ {
+ // If its legal, take it and jump back to top
+ if (*srcPtr < 0x256)
+ {
+ *destPtr++ = XMLByte(*srcPtr++);
+ continue;
+ }
+
+ //
+ // Its not representable so use a replacement char. According to
+ // the options, either throw or use the replacement.
+ //
+ if (options == UnRep_Throw)
+ {
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)*srcPtr, tmpBuf, 16, 16);
+ ThrowXML2
+ (
+ TranscodingException
+ , XMLExcepts::Trans_Unrepresentable
+ , tmpBuf
+ , getEncodingName()
+ );
+ }
+ *destPtr++ = 0x1A;
+ }
+
+ // Set the chars eaten
+ charsEaten = countToDo;
+
+ // Return the bytes we transcoded
+ return countToDo;
+}
+
+
+bool XML88591Transcoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ return (toCheck < 256);
}
1.4 +16 -10 xml-xerces/c/src/util/XML88591Transcoder.hpp
Index: XML88591Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XML88591Transcoder.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XML88591Transcoder.hpp 2000/03/02 19:54:47 1.3
+++ XML88591Transcoder.hpp 2000/03/17 23:59:54 1.4
@@ -87,17 +87,8 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -105,6 +96,21 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
private :
1.5 +81 -46 xml-xerces/c/src/util/XMLASCIITranscoder.cpp
Index: XMLASCIITranscoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLASCIITranscoder.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLASCIITranscoder.cpp 2000/03/02 19:54:48 1.4
+++ XMLASCIITranscoder.cpp 2000/03/17 23:59:54 1.5
@@ -84,46 +84,13 @@
// ---------------------------------------------------------------------------
// XMLASCIITranscoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XMLASCIITranscoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLASCIITranscoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If no source, then give up
- if (!srcBytes)
- return 0;
-
- // If the source char is invalid, then give up
- if (*srcData > 0x7F)
- {
- ThrowXML1
- (
- TranscodingException
- , XMLExcepts::Trans_NotInSourceSet
- , XMLUni::fgUSASCIIEncodingString
- );
- }
-
- // We eat one source byte and just cast the ASCII char to XMLCh
- bytesEaten = 1;
- return XMLCh(*srcData);
-}
-
-
unsigned int
-XMLASCIITranscoder::transcodeXML(const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
+XMLASCIITranscoder::transcodeFrom( const XMLByte* const srcData
+ , const unsigned int srcCount
+ , XMLCh* const toFill
+ , const unsigned int maxChars
+ , unsigned int& bytesEaten
+ , unsigned char* const charSizes)
{
// If debugging, make sure that the block size is legal
#if defined(XERCES_DEBUG)
@@ -132,7 +99,7 @@
//
// Calculate the max chars we can do here. Its the lesser of the
- // max output chars and the source count.
+ // max output chars and the source byte count.
//
const unsigned int countToDo = srcCount < maxChars ? srcCount : maxChars;
@@ -141,15 +108,15 @@
// over to the XMLCh format. Check each source that its really a
// valid ASCI char.
//
- const XMLByte* inPtr = srcData;
+ const XMLByte* srcPtr = srcData;
XMLCh* outPtr = toFill;
unsigned int countDone = 0;
for (; countDone < countToDo; countDone++)
{
// Do the optimistic work up front
- if (*inPtr < 0x80)
+ if (*srcPtr < 0x80)
{
- *outPtr++ = XMLCh(*inPtr++);
+ *outPtr++ = XMLCh(*srcPtr++);
continue;
}
@@ -161,11 +128,14 @@
if (countDone > 32)
break;
- ThrowXML1
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)*srcPtr, tmpBuf, 16, 16);
+ ThrowXML2
(
TranscodingException
- , XMLExcepts::Trans_NotInSourceSet
- , XMLUni::fgUSASCIIEncodingString
+ , XMLExcepts::Trans_Unrepresentable
+ , tmpBuf
+ , getEncodingName()
);
}
@@ -177,4 +147,69 @@
// Return the chars we transcoded
return countDone;
+}
+
+
+unsigned int
+XMLASCIITranscoder::transcodeTo(const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // If debugging, make sure that the block size is legal
+ #if defined(XERCES_DEBUG)
+ checkBlockSize(maxBytes);
+ #endif
+
+ //
+ // Calculate the max chars we can do here. Its the lesser of the
+ // max output chars and the source byte count.
+ //
+ const unsigned int countToDo = srcCount < maxBytes ? srcCount : maxBytes;
+
+ const XMLCh* srcPtr = srcData;
+ XMLByte* outPtr = toFill;
+ for (unsigned int index; index < countToDo; index++)
+ {
+ // If its legal, do it and jump back to the top
+ if (*srcPtr < 0x80)
+ {
+ *outPtr++ = XMLByte(*srcPtr++);
+ continue;
+ }
+
+ //
+ // Its not representable so use a replacement char. According to
+ // the options, either throw or use the replacement.
+ //
+ if (options == UnRep_Throw)
+ {
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)*srcPtr, tmpBuf, 16, 16);
+ ThrowXML2
+ (
+ TranscodingException
+ , XMLExcepts::Trans_Unrepresentable
+ , tmpBuf
+ , getEncodingName()
+ );
+ }
+
+ // Use the replacement char
+ *outPtr++ = 0x1A;
+ }
+
+ // Set the chars we ate
+ charsEaten = countToDo;
+
+ // Return the byte we transcoded
+ return countToDo;
+}
+
+
+bool XMLASCIITranscoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ return (toCheck < 0x80);
}
1.5 +16 -10 xml-xerces/c/src/util/XMLASCIITranscoder.hpp
Index: XMLASCIITranscoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLASCIITranscoder.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLASCIITranscoder.hpp 2000/03/02 19:54:48 1.4
+++ XMLASCIITranscoder.hpp 2000/03/17 23:59:54 1.5
@@ -87,17 +87,8 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -105,6 +96,21 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
private :
1.3 +45 -25 xml-xerces/c/src/util/XMLChTranscoder.cpp
Index: XMLChTranscoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLChTranscoder.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLChTranscoder.cpp 2000/03/02 19:54:48 1.2
+++ XMLChTranscoder.cpp 2000/03/17 23:59:54 1.3
@@ -83,32 +83,8 @@
// ---------------------------------------------------------------------------
// XMLChTranscoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XMLChTranscoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLChTranscoder::transcodeOne( const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If not enough source bytes, return zero
- if (srcBytes < sizeof(XMLCh))
- return 0;
-
- // We are going to eat one XMLCh char's worth of bytes
- bytesEaten = sizeof(XMLCh);
-
- // Just cast the src bufer and deref the char currently there
- return *((const XMLCh*)srcData);
-}
-
-
unsigned int
-XMLChTranscoder::transcodeXML( const XMLByte* const srcData
+XMLChTranscoder::transcodeFrom( const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
, const unsigned int maxChars
@@ -141,4 +117,48 @@
// Return the chars we transcoded
return countToDo;
+}
+
+
+unsigned int
+XMLChTranscoder::transcodeTo(const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // If debugging, make sure that the block size is legal
+ #if defined(XERCES_DEBUG)
+ checkBlockSize(maxBytes);
+ #endif
+
+
+ //
+ // Calculate the max chars we can do here. Its the lesser of the
+ // max chars we can store in the output byte buffer, and the number
+ // of chars in the source.
+ //
+ const unsigned int maxOutChars = maxBytes / sizeof(XMLCh);
+ const unsigned int countToDo = maxOutChars < srcCount
+ ? maxOutChars : srcCount;
+
+ //
+ // Copy over the number of chars we calculated. Note that we have
+ // to convert the char count to a byte count!!
+ //
+ memcpy(toFill, srcData, countToDo * sizeof(XMLCh));
+
+ // Set the chars eaten
+ charsEaten = countToDo;
+
+ // Return the bytes we transcoded
+ return countToDo * sizeof(XMLCh);
+}
+
+
+bool XMLChTranscoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ // We can handle anything
+ return true;
}
1.3 +16 -10 xml-xerces/c/src/util/XMLChTranscoder.hpp
Index: XMLChTranscoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLChTranscoder.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLChTranscoder.hpp 2000/03/02 19:54:48 1.2
+++ XMLChTranscoder.hpp 2000/03/17 23:59:54 1.3
@@ -84,17 +84,8 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -102,6 +93,21 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
private :
1.6 +147 -433 xml-xerces/c/src/util/XMLEBCDICTranscoder.cpp
Index: XMLEBCDICTranscoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLEBCDICTranscoder.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLEBCDICTranscoder.cpp 2000/03/02 19:54:48 1.5
+++ XMLEBCDICTranscoder.cpp 2000/03/17 23:59:54 1.6
@@ -58,56 +58,153 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-#include <util/BitOps.hpp>
#include <util/XMLEBCDICTranscoder.hpp>
-#include <util/TranscodingException.hpp>
-#include <memory.h>
// ---------------------------------------------------------------------------
// Local const data
//
-// gEBCDICXlatTable
-// This is the translation table for EBCDIC-US to Unicode. This table
-// contains 255 entries. The entry for x is the Unicode symbol for
-// EBCDIC-US code x.
-// ---------------------------------------------------------------------------
-static const XMLCh gEBCDICXlatTable[256] =
+// gFromTable
+// This is the translation table for IBM037 EBCDIC to Unicode. This
+// table contains 255 entries. The entry for EBCDIC byte x is the
+// Unicode translation of that byte.
+//
+// gToTable
+// gToTableSz
+// This is the translation table for Unicode to IBM037 EBCDIC. This one
+// contains a list of records, sorted by the Unicode code point. We do
+// a binary search to find the Unicode point, and that record's other
+// field is the IBM037 code point to translate to.
+// ---------------------------------------------------------------------------
+static const XMLCh gFromTable[256] =
+{
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F
+ , 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
+ , 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087
+ , 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F
+ , 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B
+ , 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007
+ , 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004
+ , 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A
+ , 0x0020, 0x00A0, 0x00E2, 0x00E4, 0x00E0, 0x00E1, 0x00E3, 0x00E5
+ , 0x00E7, 0x00F1, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C
+ , 0x0026, 0x00E9, 0x00EA, 0x00EB, 0x00E8, 0x00ED, 0x00EE, 0x00EF
+ , 0x00EC, 0x00DF, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC
+ , 0x002D, 0x002F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5
+ , 0x00C7, 0x00D1, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F
+ , 0x00F8, 0x00C9, 0x00CA, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF
+ , 0x00CC, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022
+ , 0x00D8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067
+ , 0x0068, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1
+ , 0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070
+ , 0x0071, 0x0072, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x00A4
+ , 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078
+ , 0x0079, 0x007A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE
+ , 0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC
+ , 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7
+ , 0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047
+ , 0x0048, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5
+ , 0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050
+ , 0x0051, 0x0052, 0x00B9, 0x00FB, 0x00FC, 0x00F9, 0x00FA, 0x00FF
+ , 0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058
+ , 0x0059, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5
+ , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037
+ , 0x0038, 0x0039, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F
+};
+
+static const XMLTransService::TransRec gToTable[] =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F
- , 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
- , 0x0010, 0x0011, 0x0012, 0x0013, 0x009D, 0x0085, 0x0008, 0x0087
- , 0x0018, 0x0019, 0x0092, 0x008F, 0x001C, 0x001D, 0x001E, 0x001F
- , 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x000A, 0x0017, 0x001B
- , 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x0005, 0x0006, 0x0007
- , 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004
- , 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A
- , 0x0020, 0x00A0, 0x00E2, 0x00E4, 0x00E0, 0x00E1, 0x00E3, 0x00E5
- , 0x00E7, 0x00F1, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C
- , 0x0026, 0x00E9, 0x00EA, 0x00EB, 0x00E8, 0x00ED, 0x00EE, 0x00EF
- , 0x00EC, 0x00DF, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC
- , 0x002D, 0x002F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5
- , 0x00C7, 0x00D1, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F
- , 0x00F8, 0x00C9, 0x00CA, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF
- , 0x00CC, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022
- , 0x00D8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067
- , 0x0068, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1
- , 0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070
- , 0x0071, 0x0072, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x00A4
- , 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078
- , 0x0079, 0x007A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE
- , 0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC
- , 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7
- , 0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047
- , 0x0048, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5
- , 0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050
- , 0x0051, 0x0052, 0x00B9, 0x00FB, 0x00FC, 0x00F9, 0x00FA, 0x00FF
- , 0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058
- , 0x0059, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5
- , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037
- , 0x0038, 0x0039, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F
+ { 0x0000, 0x00 }, { 0x0001, 0x01 }, { 0x0002, 0x02 }, { 0x0003, 0x03 }
+ , { 0x0004, 0x37 }, { 0x0005, 0x2D }, { 0x0006, 0x2E }, { 0x0007, 0x2F }
+ , { 0x0008, 0x16 }, { 0x0009, 0x05 }, { 0x000A, 0x25 }, { 0x000B, 0x0B }
+ , { 0x000C, 0x0C }, { 0x000D, 0x0D }, { 0x000E, 0x0E }, { 0x000F, 0x0F }
+ , { 0x0010, 0x10 }, { 0x0011, 0x11 }, { 0x0012, 0x12 }, { 0x0013, 0x13 }
+ , { 0x0014, 0x3C }, { 0x0015, 0x3D }, { 0x0016, 0x32 }, { 0x0017, 0x26 }
+ , { 0x0018, 0x18 }, { 0x0019, 0x19 }, { 0x001A, 0x3F }, { 0x001B, 0x27 }
+ , { 0x001C, 0x1C }, { 0x001D, 0x1D }, { 0x001E, 0x1E }, { 0x001F, 0x1F }
+ , { 0x0020, 0x40 }, { 0x0021, 0x5A }, { 0x0022, 0x7F }, { 0x0023, 0x7B }
+ , { 0x0024, 0x5B }, { 0x0025, 0x6C }, { 0x0026, 0x50 }, { 0x0027, 0x7D }
+ , { 0x0028, 0x4D }, { 0x0029, 0x5D }, { 0x002A, 0x5C }, { 0x002B, 0x4E }
+ , { 0x002C, 0x6B }, { 0x002D, 0x60 }, { 0x002E, 0x4B }, { 0x002F, 0x61 }
+ , { 0x0030, 0xF0 }, { 0x0031, 0xF1 }, { 0x0032, 0xF2 }, { 0x0033, 0xF3 }
+ , { 0x0034, 0xF4 }, { 0x0035, 0xF5 }, { 0x0036, 0xF6 }, { 0x0037, 0xF7 }
+ , { 0x0038, 0xF8 }, { 0x0039, 0xF9 }, { 0x003A, 0x7A }, { 0x003B, 0x5E }
+ , { 0x003C, 0x4C }, { 0x003D, 0x7E }, { 0x003E, 0x6E }, { 0x003F, 0x6F }
+ , { 0x0040, 0x7C }, { 0x0041, 0xC1 }, { 0x0042, 0xC2 }, { 0x0043, 0xC3 }
+ , { 0x0044, 0xC4 }, { 0x0045, 0xC5 }, { 0x0046, 0xC6 }, { 0x0047, 0xC7 }
+ , { 0x0048, 0xC8 }, { 0x0049, 0xC9 }, { 0x004A, 0xD1 }, { 0x004B, 0xD2 }
+ , { 0x004C, 0xD3 }, { 0x004D, 0xD4 }, { 0x004E, 0xD5 }, { 0x004F, 0xD6 }
+ , { 0x0050, 0xD7 }, { 0x0051, 0xD8 }, { 0x0052, 0xD9 }, { 0x0053, 0xE2 }
+ , { 0x0054, 0xE3 }, { 0x0055, 0xE4 }, { 0x0056, 0xE5 }, { 0x0057, 0xE6 }
+ , { 0x0058, 0xE7 }, { 0x0059, 0xE8 }, { 0x005A, 0xE9 }, { 0x005B, 0xBA }
+ , { 0x005C, 0xE0 }, { 0x005D, 0xBB }, { 0x005E, 0xB0 }, { 0x005F, 0x6D }
+ , { 0x0060, 0x79 }, { 0x0061, 0x81 }, { 0x0062, 0x82 }, { 0x0063, 0x83 }
+ , { 0x0064, 0x84 }, { 0x0065, 0x85 }, { 0x0066, 0x86 }, { 0x0067, 0x87 }
+ , { 0x0068, 0x88 }, { 0x0069, 0x89 }, { 0x006A, 0x91 }, { 0x006B, 0x92 }
+ , { 0x006C, 0x93 }, { 0x006D, 0x94 }, { 0x006E, 0x95 }, { 0x006F, 0x96 }
+ , { 0x0070, 0x97 }, { 0x0071, 0x98 }, { 0x0072, 0x99 }, { 0x0073, 0xA2 }
+ , { 0x0074, 0xA3 }, { 0x0075, 0xA4 }, { 0x0076, 0xA5 }, { 0x0077, 0xA6 }
+ , { 0x0078, 0xA7 }, { 0x0079, 0xA8 }, { 0x007A, 0xA9 }, { 0x007B, 0xC0 }
+ , { 0x007C, 0x4F }, { 0x007D, 0xD0 }, { 0x007E, 0xA1 }, { 0x007F, 0x07 }
+ , { 0x0080, 0x20 }, { 0x0081, 0x21 }, { 0x0082, 0x22 }, { 0x0083, 0x23 }
+ , { 0x0084, 0x24 }, { 0x0085, 0x15 }, { 0x0086, 0x06 }, { 0x0087, 0x17 }
+ , { 0x0088, 0x28 }, { 0x0089, 0x29 }, { 0x008A, 0x2A }, { 0x008B, 0x2B }
+ , { 0x008C, 0x2C }, { 0x008D, 0x09 }, { 0x008E, 0x0A }, { 0x008F, 0x1B }
+ , { 0x0090, 0x30 }, { 0x0091, 0x31 }, { 0x0092, 0x1A }, { 0x0093, 0x33 }
+ , { 0x0094, 0x34 }, { 0x0095, 0x35 }, { 0x0096, 0x36 }, { 0x0097, 0x08 }
+ , { 0x0098, 0x38 }, { 0x0099, 0x39 }, { 0x009A, 0x3A }, { 0x009B, 0x3B }
+ , { 0x009C, 0x04 }, { 0x009D, 0x14 }, { 0x009E, 0x3E }, { 0x009F, 0xFF }
+ , { 0x00A0, 0x41 }, { 0x00A1, 0xAA }, { 0x00A2, 0x4A }, { 0x00A3, 0xB1 }
+ , { 0x00A4, 0x9F }, { 0x00A5, 0xB2 }, { 0x00A6, 0x6A }, { 0x00A7, 0xB5 }
+ , { 0x00A8, 0xBD }, { 0x00A9, 0xB4 }, { 0x00AA, 0x9A }, { 0x00AB, 0x8A }
+ , { 0x00AC, 0x5F }, { 0x00AD, 0xCA }, { 0x00AE, 0xAF }, { 0x00AF, 0xBC }
+ , { 0x00B0, 0x90 }, { 0x00B1, 0x8F }, { 0x00B2, 0xEA }, { 0x00B3, 0xFA }
+ , { 0x00B4, 0xBE }, { 0x00B5, 0xA0 }, { 0x00B6, 0xB6 }, { 0x00B7, 0xB3 }
+ , { 0x00B8, 0x9D }, { 0x00B9, 0xDA }, { 0x00BA, 0x9B }, { 0x00BB, 0x8B }
+ , { 0x00BC, 0xB7 }, { 0x00BD, 0xB8 }, { 0x00BE, 0xB9 }, { 0x00BF, 0xAB }
+ , { 0x00C0, 0x64 }, { 0x00C1, 0x65 }, { 0x00C2, 0x62 }, { 0x00C3, 0x66 }
+ , { 0x00C4, 0x63 }, { 0x00C5, 0x67 }, { 0x00C6, 0x9E }, { 0x00C7, 0x68 }
+ , { 0x00C8, 0x74 }, { 0x00C9, 0x71 }, { 0x00CA, 0x72 }, { 0x00CB, 0x73 }
+ , { 0x00CC, 0x78 }, { 0x00CD, 0x75 }, { 0x00CE, 0x76 }, { 0x00CF, 0x77 }
+ , { 0x00D0, 0xAC }, { 0x00D1, 0x69 }, { 0x00D2, 0xED }, { 0x00D3, 0xEE }
+ , { 0x00D4, 0xEB }, { 0x00D5, 0xEF }, { 0x00D6, 0xEC }, { 0x00D7, 0xBF }
+ , { 0x00D8, 0x80 }, { 0x00D9, 0xFD }, { 0x00DA, 0xFE }, { 0x00DB, 0xFB }
+ , { 0x00DC, 0xFC }, { 0x00DD, 0xAD }, { 0x00DE, 0xAE }, { 0x00DF, 0x59 }
+ , { 0x00E0, 0x44 }, { 0x00E1, 0x45 }, { 0x00E2, 0x42 }, { 0x00E3, 0x46 }
+ , { 0x00E4, 0x43 }, { 0x00E5, 0x47 }, { 0x00E6, 0x9C }, { 0x00E7, 0x48 }
+ , { 0x00E8, 0x54 }, { 0x00E9, 0x51 }, { 0x00EA, 0x52 }, { 0x00EB, 0x53 }
+ , { 0x00EC, 0x58 }, { 0x00ED, 0x55 }, { 0x00EE, 0x56 }, { 0x00EF, 0x57 }
+ , { 0x00F0, 0x8C }, { 0x00F1, 0x49 }, { 0x00F2, 0xCD }, { 0x00F3, 0xCE }
+ , { 0x00F4, 0xCB }, { 0x00F5, 0xCF }, { 0x00F6, 0xCC }, { 0x00F7, 0xE1 }
+ , { 0x00F8, 0x70 }, { 0x00F9, 0xDD }, { 0x00FA, 0xDE }, { 0x00FB, 0xDB }
+ , { 0x00FC, 0xDC }, { 0x00FD, 0x8D }, { 0x00FE, 0x8E }, { 0x00FF, 0xDF }
+ , { 0x203E, 0xBC }, { 0xFF01, 0x5A }, { 0xFF02, 0x7F }, { 0xFF03, 0x7B }
+ , { 0xFF04, 0x5B }, { 0xFF05, 0x6C }, { 0xFF06, 0x50 }, { 0xFF07, 0x7D }
+ , { 0xFF08, 0x4D }, { 0xFF09, 0x5D }, { 0xFF0A, 0x5C }, { 0xFF0B, 0x4E }
+ , { 0xFF0C, 0x6B }, { 0xFF0D, 0x60 }, { 0xFF0E, 0x4B }, { 0xFF0F, 0x61 }
+ , { 0xFF10, 0xF0 }, { 0xFF11, 0xF1 }, { 0xFF12, 0xF2 }, { 0xFF13, 0xF3 }
+ , { 0xFF14, 0xF4 }, { 0xFF15, 0xF5 }, { 0xFF16, 0xF6 }, { 0xFF17, 0xF7 }
+ , { 0xFF18, 0xF8 }, { 0xFF19, 0xF9 }, { 0xFF1A, 0x7A }, { 0xFF1B, 0x5E }
+ , { 0xFF1C, 0x4C }, { 0xFF1D, 0x7E }, { 0xFF1E, 0x6E }, { 0xFF1F, 0x6F }
+ , { 0xFF20, 0x7C }, { 0xFF21, 0xC1 }, { 0xFF22, 0xC2 }, { 0xFF23, 0xC3 }
+ , { 0xFF24, 0xC4 }, { 0xFF25, 0xC5 }, { 0xFF26, 0xC6 }, { 0xFF27, 0xC7 }
+ , { 0xFF28, 0xC8 }, { 0xFF29, 0xC9 }, { 0xFF2A, 0xD1 }, { 0xFF2B, 0xD2 }
+ , { 0xFF2C, 0xD3 }, { 0xFF2D, 0xD4 }, { 0xFF2E, 0xD5 }, { 0xFF2F, 0xD6 }
+ , { 0xFF30, 0xD7 }, { 0xFF31, 0xD8 }, { 0xFF32, 0xD9 }, { 0xFF33, 0xE2 }
+ , { 0xFF34, 0xE3 }, { 0xFF35, 0xE4 }, { 0xFF36, 0xE5 }, { 0xFF37, 0xE6 }
+ , { 0xFF38, 0xE7 }, { 0xFF39, 0xE8 }, { 0xFF3A, 0xE9 }, { 0xFF3B, 0xBA }
+ , { 0xFF3C, 0xE0 }, { 0xFF3D, 0xBB }, { 0xFF3E, 0xB0 }, { 0xFF3F, 0x6D }
+ , { 0xFF40, 0x79 }, { 0xFF41, 0x81 }, { 0xFF42, 0x82 }, { 0xFF43, 0x83 }
+ , { 0xFF44, 0x84 }, { 0xFF45, 0x85 }, { 0xFF46, 0x86 }, { 0xFF47, 0x87 }
+ , { 0xFF48, 0x88 }, { 0xFF49, 0x89 }, { 0xFF4A, 0x91 }, { 0xFF4B, 0x92 }
+ , { 0xFF4C, 0x93 }, { 0xFF4D, 0x94 }, { 0xFF4E, 0x95 }, { 0xFF4F, 0x96 }
+ , { 0xFF50, 0x97 }, { 0xFF51, 0x98 }, { 0xFF52, 0x99 }, { 0xFF53, 0xA2 }
+ , { 0xFF54, 0xA3 }, { 0xFF55, 0xA4 }, { 0xFF56, 0xA5 }, { 0xFF57, 0xA6 }
+ , { 0xFF58, 0xA7 }, { 0xFF59, 0xA8 }, { 0xFF5A, 0xA9 }, { 0xFF5B, 0xC0 }
+ , { 0xFF5C, 0x4F }, { 0xFF5D, 0xD0 }, { 0xFF5E, 0xA1 }
};
+static const unsigned int gToTableSz = 351;
@@ -116,7 +213,7 @@
// ---------------------------------------------------------------------------
XMLCh XMLEBCDICTranscoder::xlatThisOne(const XMLByte toXlat)
{
- return gEBCDICXlatTable[toXlat];
+ return gFromTable[toXlat];
}
@@ -126,7 +223,14 @@
XMLEBCDICTranscoder::XMLEBCDICTranscoder(const XMLCh* const encodingName
, const unsigned int blockSize) :
- XMLTranscoder(encodingName, blockSize)
+ XML256TableTranscoder
+ (
+ encodingName
+ , blockSize
+ , gFromTable
+ , gToTable
+ , gToTableSz
+ )
{
}
@@ -134,393 +238,3 @@
XMLEBCDICTranscoder::~XMLEBCDICTranscoder()
{
}
-
-
-// ---------------------------------------------------------------------------
-// XMLEBCDICTranscoder: Implementation of the transcoder API
-// ---------------------------------------------------------------------------
-bool XMLEBCDICTranscoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLEBCDICTranscoder::transcodeOne( const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If no source, give up
- if (!srcBytes)
- return 0;
-
- // We will eat one byte
- bytesEaten = 1;
-
- // And use the 0th byte as a look in our table
- return gEBCDICXlatTable[*srcData];
-}
-
-
-unsigned int
-XMLEBCDICTranscoder::transcodeXML( const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
-{
- // If debugging, make sure that the block size is legal
- #if defined(XERCES_DEBUG)
- checkBlockSize(maxChars);
- #endif
-
- //
- // Calculate the max chars we can do here. Its the lesser of the
- // max output chars and the number of chars in the source.
- //
- const unsigned int countToDo = srcCount < maxChars ? srcCount : maxChars;
-
- //
- // Loop through the count we have to do and map each char via the
- // lookup table.
- //
- const XMLByte* srcPtr = srcData;
- const XMLByte* endPtr = (srcPtr + countToDo);
- XMLCh* outPtr = toFill;
- while (srcPtr < endPtr)
- *outPtr++ = gEBCDICXlatTable[*srcPtr++];
-
- // Set the bytes eaten
- bytesEaten = countToDo;
-
- // Set the character sizes to the fixed size
- memset(charSizes, 1, countToDo);
-
- // Return the chars we transcoded
- return countToDo;
-}
-
-
-
-#if 0
-struct XlatRecord
-{
- XMLCh xmlCh;
- XMLByte ebcdicCh;
-};
-
-static XlatRecord gXlatTable[] =
-{
- { 0x0000 , 0x00 }
- , { 0x0001 , 0x01 }
- , { 0x0002 , 0x02 }
- , { 0x0003 , 0x03 }
- , { 0x0004 , 0x37 }
- , { 0x0005 , 0x2D }
- , { 0x0006 , 0x2E }
- , { 0x0007 , 0x2F }
- , { 0x0008 , 0x16 }
- , { 0x0009 , 0x05 }
- , { 0x000A , 0x25 }
- , { 0x000B , 0x0B }
- , { 0x000C , 0x0C }
- , { 0x000D , 0x0D }
- , { 0x000E , 0x0E }
- , { 0x000F , 0x0F }
- , { 0x0010 , 0x10 }
- , { 0x0011 , 0x11 }
- , { 0x0012 , 0x12 }
- , { 0x0013 , 0x13 }
- , { 0x0014 , 0x3C }
- , { 0x0015 , 0x3D }
- , { 0x0016 , 0x32 }
- , { 0x0017 , 0x26 }
- , { 0x0018 , 0x18 }
- , { 0x0019 , 0x19 }
- , { 0x001A , 0x3F }
- , { 0x001B , 0x27 }
- , { 0x001C , 0x1C }
- , { 0x001D , 0x1D }
- , { 0x001E , 0x1E }
- , { 0x001F , 0x1F }
- , { 0x0020 , 0x40 }
- , { 0x0021 , 0x5A }
- , { 0x0022 , 0x7F }
- , { 0x0023 , 0x7B }
- , { 0x0024 , 0x5B }
- , { 0x0025 , 0x6C }
- , { 0x0026 , 0x50 }
- , { 0x0027 , 0x7D }
- , { 0x0028 , 0x4D }
- , { 0x0029 , 0x5D }
- , { 0x002A , 0x5C }
- , { 0x002B , 0x4E }
- , { 0x002C , 0x6B }
- , { 0x002D , 0x60 }
- , { 0x002E , 0x4B }
- , { 0x002F , 0x61 }
- , { 0x0030 , 0xF0 }
- , { 0x0031 , 0xF1 }
- , { 0x0032 , 0xF2 }
- , { 0x0033 , 0xF3 }
- , { 0x0034 , 0xF4 }
- , { 0x0035 , 0xF5 }
- , { 0x0036 , 0xF6 }
- , { 0x0037 , 0xF7 }
- , { 0x0038 , 0xF8 }
- , { 0x0039 , 0xF9 }
- , { 0x003A , 0x7A }
- , { 0x003B , 0x5E }
- , { 0x003C , 0x4C }
- , { 0x003D , 0x7E }
- , { 0x003E , 0x6E }
- , { 0x003F , 0x6F }
- , { 0x0040 , 0x7C }
- , { 0x0041 , 0xC1 }
- , { 0x0042 , 0xC2 }
- , { 0x0043 , 0xC3 }
- , { 0x0044 , 0xC4 }
- , { 0x0045 , 0xC5 }
- , { 0x0046 , 0xC6 }
- , { 0x0047 , 0xC7 }
- , { 0x0048 , 0xC8 }
- , { 0x0049 , 0xC9 }
- , { 0x004A , 0xD1 }
- , { 0x004B , 0xD2 }
- , { 0x004C , 0xD3 }
- , { 0x004D , 0xD4 }
- , { 0x004E , 0xD5 }
- , { 0x004F , 0xD6 }
- , { 0x0050 , 0xD7 }
- , { 0x0051 , 0xD8 }
- , { 0x0052 , 0xD9 }
- , { 0x0053 , 0xE2 }
- , { 0x0054 , 0xE3 }
- , { 0x0055 , 0xE4 }
- , { 0x0056 , 0xE5 }
- , { 0x0057 , 0xE6 }
- , { 0x0058 , 0xE7 }
- , { 0x0059 , 0xE8 }
- , { 0x005A , 0xE9 }
- , { 0x005B , 0xBA }
- , { 0x005C , 0xE0 }
- , { 0x005D , 0xBB }
- , { 0x005E , 0xB0 }
- , { 0x005F , 0x6D }
- , { 0x0060 , 0x79 }
- , { 0x0061 , 0x81 }
- , { 0x0062 , 0x82 }
- , { 0x0063 , 0x83 }
- , { 0x0064 , 0x84 }
- , { 0x0065 , 0x85 }
- , { 0x0066 , 0x86 }
- , { 0x0067 , 0x87 }
- , { 0x0068 , 0x88 }
- , { 0x0069 , 0x89 }
- , { 0x006A , 0x91 }
- , { 0x006B , 0x92 }
- , { 0x006C , 0x93 }
- , { 0x006D , 0x94 }
- , { 0x006E , 0x95 }
- , { 0x006F , 0x96 }
- , { 0x0070 , 0x97 }
- , { 0x0071 , 0x98 }
- , { 0x0072 , 0x99 }
- , { 0x0073 , 0xA2 }
- , { 0x0074 , 0xA3 }
- , { 0x0075 , 0xA4 }
- , { 0x0076 , 0xA5 }
- , { 0x0077 , 0xA6 }
- , { 0x0078 , 0xA7 }
- , { 0x0079 , 0xA8 }
- , { 0x007A , 0xA9 }
- , { 0x007B , 0xC0 }
- , { 0x007C , 0x4F }
- , { 0x007D , 0xD0 }
- , { 0x007E , 0xA1 }
- , { 0x007F , 0x07 }
- , { 0x0080 , 0x20 }
- , { 0x0081 , 0x21 }
- , { 0x0082 , 0x22 }
- , { 0x0083 , 0x23 }
- , { 0x0084 , 0x24 }
- , { 0x0085 , 0x15 }
- , { 0x0086 , 0x06 }
- , { 0x0087 , 0x17 }
- , { 0x0088 , 0x28 }
- , { 0x0089 , 0x29 }
- , { 0x008A , 0x2A }
- , { 0x008B , 0x2B }
- , { 0x008C , 0x2C }
- , { 0x008D , 0x09 }
- , { 0x008E , 0x0A }
- , { 0x008F , 0x1B }
- , { 0x0090 , 0x30 }
- , { 0x0091 , 0x31 }
- , { 0x0092 , 0x1A }
- , { 0x0093 , 0x33 }
- , { 0x0094 , 0x34 }
- , { 0x0095 , 0x35 }
- , { 0x0096 , 0x36 }
- , { 0x0097 , 0x08 }
- , { 0x0098 , 0x38 }
- , { 0x0099 , 0x39 }
- , { 0x009A , 0x3A }
- , { 0x009B , 0x3B }
- , { 0x009C , 0x04 }
- , { 0x009D , 0x14 }
- , { 0x009E , 0x3E }
- , { 0x009F , 0xFF }
- , { 0x00A0 , 0x41 }
- , { 0x00A1 , 0xAA }
- , { 0x00A2 , 0x4A }
- , { 0x00A3 , 0xB1 }
- , { 0x00A4 , 0x9F }
- , { 0x00A5 , 0xB2 }
- , { 0x00A6 , 0x6A }
- , { 0x00A7 , 0xB5 }
- , { 0x00A8 , 0xBD }
- , { 0x00A9 , 0xB4 }
- , { 0x00AA , 0x9A }
- , { 0x00AB , 0x8A }
- , { 0x00AC , 0x5F }
- , { 0x00AD , 0xCA }
- , { 0x00AE , 0xAF }
- , { 0x00AF , 0xBC }
- , { 0x00B0 , 0x90 }
- , { 0x00B1 , 0x8F }
- , { 0x00B2 , 0xEA }
- , { 0x00B3 , 0xFA }
- , { 0x00B4 , 0xBE }
- , { 0x00B5 , 0xA0 }
- , { 0x00B6 , 0xB6 }
- , { 0x00B7 , 0xB3 }
- , { 0x00B8 , 0x9D }
- , { 0x00B9 , 0xDA }
- , { 0x00BA , 0x9B }
- , { 0x00BB , 0x8B }
- , { 0x00BC , 0xB7 }
- , { 0x00BD , 0xB8 }
- , { 0x00BE , 0xB9 }
- , { 0x00BF , 0xAB }
- , { 0x00C0 , 0x64 }
- , { 0x00C1 , 0x65 }
- , { 0x00C2 , 0x62 }
- , { 0x00C3 , 0x66 }
- , { 0x00C4 , 0x63 }
- , { 0x00C5 , 0x67 }
- , { 0x00C6 , 0x9E }
- , { 0x00C7 , 0x68 }
- , { 0x00C8 , 0x74 }
- , { 0x00C9 , 0x71 }
- , { 0x00CA , 0x72 }
- , { 0x00CB , 0x73 }
- , { 0x00CC , 0x78 }
- , { 0x00CD , 0x75 }
- , { 0x00CE , 0x76 }
- , { 0x00CF , 0x77 }
- , { 0x00D0 , 0xAC }
- , { 0x00D1 , 0x69 }
- , { 0x00D2 , 0xED }
- , { 0x00D3 , 0xEE }
- , { 0x00D4 , 0xEB }
- , { 0x00D5 , 0xEF }
- , { 0x00D6 , 0xEC }
- , { 0x00D7 , 0xBF }
- , { 0x00D8 , 0x80 }
- , { 0x00D9 , 0xFD }
- , { 0x00DA , 0xFE }
- , { 0x00DB , 0xFB }
- , { 0x00DC , 0xFC }
- , { 0x00DD , 0xAD }
- , { 0x00DE , 0xAE }
- , { 0x00DF , 0x59 }
- , { 0x00E0 , 0x44 }
- , { 0x00E1 , 0x45 }
- , { 0x00E2 , 0x42 }
- , { 0x00E3 , 0x46 }
- , { 0x00E4 , 0x43 }
- , { 0x00E5 , 0x47 }
- , { 0x00E6 , 0x9C }
- , { 0x00E7 , 0x48 }
- , { 0x00E8 , 0x54 }
- , { 0x00E9 , 0x51 }
- , { 0x00EA , 0x52 }
- , { 0x00EB , 0x53 }
- , { 0x00EC , 0x58 }
- , { 0x00ED , 0x55 }
- , { 0x00EE , 0x56 }
- , { 0x00EF , 0x57 }
- , { 0x00F0 , 0x8C }
- , { 0x00F1 , 0x49 }
- , { 0x00F2 , 0xCD }
- , { 0x00F3 , 0xCE }
- , { 0x00F4 , 0xCB }
- , { 0x00F5 , 0xCF }
- , { 0x00F6 , 0xCC }
- , { 0x00F7 , 0xE1 }
- , { 0x00F8 , 0x70 }
- , { 0x00F9 , 0xDD }
- , { 0x00FA , 0xDE }
- , { 0x00FB , 0xDB }
- , { 0x00FC , 0xDC }
- , { 0x00FD , 0x8D }
- , { 0x00FE , 0x8E }
- , { 0x00FF , 0xDF }
-};
-
-#include <search.h>
-#include <stdio.h>
-int compFunc(const void* p1, const void* p2)
-{
- const XlatRecord* rec1 = (const XlatRecord*)p1;
- const XlatRecord* rec2 = (const XlatRecord*)p2;
-
- return (int)rec1->ebcdicCh - (int)rec2->ebcdicCh;
-}
-
-class SpitOutTable
-{
-public :
- SpitOutTable()
- {
- spitOutTable();
- }
-
- void spitOutTable()
- {
- const unsigned int recCount = sizeof(gXlatTable) / sizeof(gXlatTable[0]);
- qsort
- (
- gXlatTable
- , recCount
- , sizeof(XlatRecord)
- , compFunc
- );
-
- unsigned int curValue = 0;
- for (unsigned int index = 0; index < recCount; index++)
- {
- if (gXlatTable[index].ebcdicCh == curValue)
- {
- printf("0x%04X\n", (unsigned int)gXlatTable[index].xmlCh);
- curValue++;
- }
- else
- {
- // We've hit a gap, so catch up
- while (curValue < gXlatTable[index].ebcdicCh)
- {
- printf("0xFFFF\n");
- curValue++;
- }
- }
- }
- }
-};
-
-SpitOutTable kicker;
-
-#endif
1.5 +3 -25 xml-xerces/c/src/util/XMLEBCDICTranscoder.hpp
Index: XMLEBCDICTranscoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLEBCDICTranscoder.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLEBCDICTranscoder.hpp 2000/03/02 19:54:48 1.4
+++ XMLEBCDICTranscoder.hpp 2000/03/17 23:59:54 1.5
@@ -58,7 +58,7 @@
#define XMLEBCDICTRANSCODER_HPP
#include <util/XercesDefs.hpp>
-#include <util/TransService.hpp>
+#include <util/XML256TableTranscoder.hpp>
//
@@ -71,7 +71,7 @@
//
// EBCDIC-US is the same as IBM037, CP37, EBCDIC-CP-US, etc...
//
-class XMLUTIL_EXPORT XMLEBCDICTranscoder : public XMLTranscoder
+class XMLUTIL_EXPORT XMLEBCDICTranscoder : public XML256TableTranscoder
{
public :
// -----------------------------------------------------------------------
@@ -92,33 +92,11 @@
virtual ~XMLEBCDICTranscoder();
- // -----------------------------------------------------------------------
- // Implementation of the XMLTranscoder interface
- // -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
- (
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
- const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes
- );
-
-
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
+ XMLEBCDICTranscoder();
XMLEBCDICTranscoder(const XMLEBCDICTranscoder&);
void operator=(const XMLEBCDICTranscoder&);
};
1.7 +80 -74 xml-xerces/c/src/util/XMLExceptMsgs.hpp
Index: XMLExceptMsgs.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLExceptMsgs.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XMLExceptMsgs.hpp 2000/03/02 19:54:48 1.6
+++ XMLExceptMsgs.hpp 2000/03/17 23:59:54 1.7
@@ -26,83 +26,89 @@
, CM_UnaryOpHadBinType = 15
, CM_UnknownCMType = 16
, CM_UnknownCMSpecType = 17
- , ElemStack_EmptyStack = 18
- , ElemStack_BadIndex = 19
- , ElemStack_StackUnderflow = 20
- , ElemStack_NoParentPushed = 21
- , Enum_NoMoreElements = 22
- , File_CouldNotOpenFile = 23
- , File_CouldNotGetCurPos = 24
- , File_CouldNotCloseFile = 25
- , File_CouldNotSeekToEnd = 26
- , File_CouldNotSeekToPos = 27
- , File_CouldNotDupHandle = 28
- , File_CouldNotReadFromFile = 29
- , File_CouldNotResetFile = 30
- , File_CouldNotGetSize = 31
- , File_CouldNotGetBasePathName = 32
- , Gen_ParseInProgress = 33
- , Gen_NoDTDValidator = 34
- , Gen_CouldNotOpenDTD = 35
- , Gen_CouldNotOpenExtEntity = 36
- , Gen_UnexpectedEOF = 37
- , HshTbl_ZeroModulus = 38
- , HshTbl_BadHashFromKey = 39
- , HshTbl_NoSuchKeyExists = 40
- , Mutex_CouldNotCreate = 41
- , Mutex_CouldNotClose = 42
- , Mutex_CouldNotLock = 43
- , Mutex_CouldNotUnlock = 44
- , Mutex_CouldNotDestroy = 45
- , NetAcc_InternalError = 46
- , Pool_ElemAlreadyExists = 47
- , Pool_BadHashFromKey = 48
- , Pool_InvalidId = 49
- , Pool_ZeroModulus = 50
- , RdrMgr_ReaderIdNotFound = 51
- , Reader_BadAutoEncoding = 52
- , Reader_CantCreateCvtrFor = 53
- , Reader_CouldNotDecodeFirstLine = 54
- , Reader_EOIInMultiSeq = 55
- , Reader_BadUTF8Seq = 56
- , Reader_BadSurrogateInUTF8 = 57
- , Reader_SrcOfsNotSupported = 58
- , Reader_EncodingStrRequired = 59
- , Scan_CouldNotOpenSource = 60
- , Scan_UnbalancedStartEnd = 61
- , Scan_BadPScanToken = 62
- , Stack_BadIndex = 63
- , Stack_EmptyStack = 64
- , Str_ZeroSizedTargetBuf = 65
- , Str_UnknownRadix = 66
- , Str_TargetBufTooSmall = 67
- , Str_StartIndexPastEnd = 68
- , Strm_StdErrWriteFailure = 69
- , Strm_StdOutWriteFailure = 70
- , Strm_ConWriteFailure = 71
- , StrPool_IllegalId = 72
- , Trans_CouldNotXCodeXMLData = 73
+ , CM_NoParentCSN = 18
+ , DTD_UnknownCreateReason = 19
+ , ElemStack_EmptyStack = 20
+ , ElemStack_BadIndex = 21
+ , ElemStack_StackUnderflow = 22
+ , ElemStack_NoParentPushed = 23
+ , Enum_NoMoreElements = 24
+ , File_CouldNotOpenFile = 25
+ , File_CouldNotGetCurPos = 26
+ , File_CouldNotCloseFile = 27
+ , File_CouldNotSeekToEnd = 28
+ , File_CouldNotSeekToPos = 29
+ , File_CouldNotDupHandle = 30
+ , File_CouldNotReadFromFile = 31
+ , File_CouldNotResetFile = 32
+ , File_CouldNotGetSize = 33
+ , File_CouldNotGetBasePathName = 34
+ , File_BasePathUnderflow = 35
+ , Gen_ParseInProgress = 36
+ , Gen_NoDTDValidator = 37
+ , Gen_CouldNotOpenDTD = 38
+ , Gen_CouldNotOpenExtEntity = 39
+ , Gen_UnexpectedEOF = 40
+ , HshTbl_ZeroModulus = 41
+ , HshTbl_BadHashFromKey = 42
+ , HshTbl_NoSuchKeyExists = 43
+ , Mutex_CouldNotCreate = 44
+ , Mutex_CouldNotClose = 45
+ , Mutex_CouldNotLock = 46
+ , Mutex_CouldNotUnlock = 47
+ , Mutex_CouldNotDestroy = 48
+ , NetAcc_InternalError = 49
+ , Pool_ElemAlreadyExists = 50
+ , Pool_BadHashFromKey = 51
+ , Pool_InvalidId = 52
+ , Pool_ZeroModulus = 53
+ , RdrMgr_ReaderIdNotFound = 54
+ , Reader_BadAutoEncoding = 55
+ , Reader_CantCreateCvtrFor = 56
+ , Reader_CouldNotDecodeFirstLine = 57
+ , Reader_EOIInMultiSeq = 58
+ , Reader_SrcOfsNotSupported = 59
+ , Reader_EncodingStrRequired = 60
+ , Scan_CouldNotOpenSource = 61
+ , Scan_UnbalancedStartEnd = 62
+ , Scan_BadPScanToken = 63
+ , Stack_BadIndex = 64
+ , Stack_EmptyStack = 65
+ , Str_ZeroSizedTargetBuf = 66
+ , Str_UnknownRadix = 67
+ , Str_TargetBufTooSmall = 68
+ , Str_StartIndexPastEnd = 69
+ , Strm_StdErrWriteFailure = 70
+ , Strm_StdOutWriteFailure = 71
+ , Strm_ConWriteFailure = 72
+ , StrPool_IllegalId = 73
, Trans_CouldNotCreateDefCvtr = 74
, Trans_InvalidSizeReq = 75
, Trans_Unrepresentable = 76
- , Trans_NotInSourceSet = 77
- , URL_MalformedURL = 78
- , URL_UnsupportedProto = 79
- , URL_UnsupportedProto1 = 80
- , URL_OnlyLocalHost = 81
- , URL_NoProtocolPresent = 82
- , URL_ExpectingTwoSlashes = 83
- , URL_IncorrectEscapedCharRef = 84
- , URL_UnterminatedHostComponent = 85
- , Vector_BadIndex = 86
- , Val_InvalidElemId = 87
- , Val_CantHaveIntSS = 88
- , XMLRec_UnknownEncoding = 89
- , E_HighBounds = 90
- , W_LowBounds = 91
- , W_HighBounds = 92
- , V_LowBounds = 93
- , V_HighBounds = 94
+ , Trans_NotValidForEncoding = 77
+ , Trans_BadBlockSize = 78
+ , Trans_BadSrcSeq = 79
+ , Trans_BadSrcCP = 80
+ , Trans_BadTrailingSurrogate = 81
+ , URL_MalformedURL = 82
+ , URL_UnsupportedProto = 83
+ , URL_UnsupportedProto1 = 84
+ , URL_OnlyLocalHost = 85
+ , URL_NoProtocolPresent = 86
+ , URL_ExpectingTwoSlashes = 87
+ , URL_IncorrectEscapedCharRef = 88
+ , URL_UnterminatedHostComponent = 89
+ , URL_RelativeBaseURL = 90
+ , URL_BaseUnderflow = 91
+ , Vector_BadIndex = 92
+ , Val_InvalidElemId = 93
+ , Val_CantHaveIntSS = 94
+ , XMLRec_UnknownEncoding = 95
+ , E_HighBounds = 96
+ , W_LowBounds = 97
+ , W_HighBounds = 98
+ , V_LowBounds = 99
+ , V_HighBounds = 100
};
};
1.3 +136 -515 xml-xerces/c/src/util/XMLIBM1140Transcoder.cpp
Index: XMLIBM1140Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLIBM1140Transcoder.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLIBM1140Transcoder.cpp 2000/03/02 19:54:48 1.2
+++ XMLIBM1140Transcoder.cpp 2000/03/17 23:59:54 1.3
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2000 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -58,22 +58,28 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-#include <util/BitOps.hpp>
#include <util/XMLIBM1140Transcoder.hpp>
-#include <util/TranscodingException.hpp>
-#include <memory.h>
// ---------------------------------------------------------------------------
// Local const data
//
-// gIBM1140XlatTable
-// This is the translation table for ibm-1140 to Unicode. This table
-// contains 255 entries. The entry for x is the Unicode symbol for
-// ibm-1140 code x.
+// NOTE: These tables are generated from the ICU UCM files, using the
+//
+// gFromTable
+// This is the translation table for IBM1140 EBCDIC to Unicode. This
+// table contains 255 entries. The entry for EBCDIC byte x is the
+// Unicode translation of that byte.
+//
+// gToTable
+// gToTableSize
+// This is the translation table for Unicode to IBM1140 EBCDIC. This one
+// contains a list of records, sorted by the Unicode code point. We do
+// a binary search to find the Unicode point, and that record's other
+// field is the IBM1140 code point to translate to.
// ---------------------------------------------------------------------------
-static const XMLCh gIBM1140XlatTable[256] =
+static const XMLCh gFromTable[256] =
{
0x0000, 0x0001, 0x0002, 0x0003, 0x009C, 0x0009, 0x0086, 0x007F
, 0x0097, 0x008D, 0x008E, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
@@ -84,30 +90,123 @@
, 0x0090, 0x0091, 0x0016, 0x0093, 0x0094, 0x0095, 0x0096, 0x0004
, 0x0098, 0x0099, 0x009A, 0x009B, 0x0014, 0x0015, 0x009E, 0x001A
, 0x0020, 0x00A0, 0x00E2, 0x00E4, 0x00E0, 0x00E1, 0x00E3, 0x00E5
- , 0x00E7, 0x00F1, 0x00A2, 0x002E, 0x003C, 0xFF08, 0xFF0B, 0xFF5C
+ , 0x00E7, 0x00F1, 0x00A2, 0x002E, 0x003C, 0x0028, 0x002B, 0x007C
, 0x0026, 0x00E9, 0x00EA, 0x00EB, 0x00E8, 0x00ED, 0x00EE, 0x00EF
- , 0x00EC, 0x00DF, 0x0021, 0x0024, 0x002A, 0xFF09, 0x003B, 0x00AC
- , 0x002D, 0xFF0F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5
- , 0x00C7, 0x00D1, 0x00A6, 0x002C, 0xFF05, 0xFF3F, 0x003E, 0x003F
+ , 0x00EC, 0x00DF, 0x0021, 0x0024, 0x002A, 0x0029, 0x003B, 0x00AC
+ , 0x002D, 0x002F, 0x00C2, 0x00C4, 0x00C0, 0x00C1, 0x00C3, 0x00C5
+ , 0x00C7, 0x00D1, 0x00A6, 0x002C, 0x0025, 0x005F, 0x003E, 0x003F
, 0x00F8, 0x00C9, 0x00CA, 0x00CB, 0x00C8, 0x00CD, 0x00CE, 0x00CF
- , 0x00CC, 0xFF40, 0xFF1A, 0x0023, 0xFF20, 0x0027, 0xFF1D, 0x0022
- , 0x00D8, 0x0061, 0xFF42, 0x0063, 0xFF44, 0xFF45, 0x0066, 0x0067
- , 0xFF48, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1
- , 0x00B0, 0xFF4A, 0x006B, 0x006C, 0xFF4D, 0x006E, 0xFF4F, 0x0070
- , 0x0071, 0xFF52, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x20AC
- , 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0xFF56, 0x0077, 0x0078
- , 0xFF59, 0xFF5A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE
- , 0xFF3E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC
+ , 0x00CC, 0x0060, 0x003A, 0x0023, 0x0040, 0x0027, 0x003D, 0x0022
+ , 0x00D8, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067
+ , 0x0068, 0x0069, 0x00AB, 0x00BB, 0x00F0, 0x00FD, 0x00FE, 0x00B1
+ , 0x00B0, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F, 0x0070
+ , 0x0071, 0x0072, 0x00AA, 0x00BA, 0x00E6, 0x00B8, 0x00C6, 0x20AC
+ , 0x00B5, 0x007E, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078
+ , 0x0079, 0x007A, 0x00A1, 0x00BF, 0x00D0, 0x00DD, 0x00DE, 0x00AE
+ , 0x005E, 0x00A3, 0x00A5, 0x00B7, 0x00A9, 0x00A7, 0x00B6, 0x00BC
, 0x00BD, 0x00BE, 0x005B, 0x005D, 0x00AF, 0x00A8, 0x00B4, 0x00D7
- , 0xFF5B, 0xFF21, 0xFF22, 0x0043, 0xFF24, 0xFF25, 0xFF26, 0x0047
- , 0xFF28, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5
- , 0x007D, 0xFF2A, 0xFF2B, 0xFF2C, 0x004D, 0x004E, 0x004F, 0x0050
+ , 0x007B, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047
+ , 0x0048, 0x0049, 0x00AD, 0x00F4, 0x00F6, 0x00F2, 0x00F3, 0x00F5
+ , 0x007D, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050
, 0x0051, 0x0052, 0x00B9, 0x00FB, 0x00FC, 0x00F9, 0x00FA, 0x00FF
- , 0x005C, 0x00F7, 0x0053, 0x0054, 0xFF35, 0xFF36, 0x0057, 0xFF38
- , 0xFF39, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5
- , 0x0030, 0x0031, 0x0032, 0xFF13, 0xFF14, 0xFF15, 0x0036, 0x0037
- , 0x0038, 0xFF19, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F
+ , 0x005C, 0x00F7, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058
+ , 0x0059, 0x005A, 0x00B2, 0x00D4, 0x00D6, 0x00D2, 0x00D3, 0x00D5
+ , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037
+ , 0x0038, 0x0039, 0x00B3, 0x00DB, 0x00DC, 0x00D9, 0x00DA, 0x009F
+};
+
+static const XMLTransService::TransRec gToTable[] =
+{
+ { 0x0000, 0x00 }, { 0x0001, 0x01 }, { 0x0002, 0x02 }, { 0x0003, 0x03 }
+ , { 0x0004, 0x37 }, { 0x0005, 0x2D }, { 0x0006, 0x2E }, { 0x0007, 0x2F }
+ , { 0x0008, 0x16 }, { 0x0009, 0x05 }, { 0x000A, 0x25 }, { 0x000B, 0x0B }
+ , { 0x000C, 0x0C }, { 0x000D, 0x0D }, { 0x000E, 0x0E }, { 0x000F, 0x0F }
+ , { 0x0010, 0x10 }, { 0x0011, 0x11 }, { 0x0012, 0x12 }, { 0x0013, 0x13 }
+ , { 0x0014, 0x3C }, { 0x0015, 0x3D }, { 0x0016, 0x32 }, { 0x0017, 0x26 }
+ , { 0x0018, 0x18 }, { 0x0019, 0x19 }, { 0x001A, 0x3F }, { 0x001B, 0x27 }
+ , { 0x001C, 0x1C }, { 0x001D, 0x1D }, { 0x001E, 0x1E }, { 0x001F, 0x1F }
+ , { 0x0020, 0x40 }, { 0x0021, 0x5A }, { 0x0022, 0x7F }, { 0x0023, 0x7B }
+ , { 0x0024, 0x5B }, { 0x0025, 0x6C }, { 0x0026, 0x50 }, { 0x0027, 0x7D }
+ , { 0x0028, 0x4D }, { 0x0029, 0x5D }, { 0x002A, 0x5C }, { 0x002B, 0x4E }
+ , { 0x002C, 0x6B }, { 0x002D, 0x60 }, { 0x002E, 0x4B }, { 0x002F, 0x61 }
+ , { 0x0030, 0xF0 }, { 0x0031, 0xF1 }, { 0x0032, 0xF2 }, { 0x0033, 0xF3 }
+ , { 0x0034, 0xF4 }, { 0x0035, 0xF5 }, { 0x0036, 0xF6 }, { 0x0037, 0xF7 }
+ , { 0x0038, 0xF8 }, { 0x0039, 0xF9 }, { 0x003A, 0x7A }, { 0x003B, 0x5E }
+ , { 0x003C, 0x4C }, { 0x003D, 0x7E }, { 0x003E, 0x6E }, { 0x003F, 0x6F }
+ , { 0x0040, 0x7C }, { 0x0041, 0xC1 }, { 0x0042, 0xC2 }, { 0x0043, 0xC3 }
+ , { 0x0044, 0xC4 }, { 0x0045, 0xC5 }, { 0x0046, 0xC6 }, { 0x0047, 0xC7 }
+ , { 0x0048, 0xC8 }, { 0x0049, 0xC9 }, { 0x004A, 0xD1 }, { 0x004B, 0xD2 }
+ , { 0x004C, 0xD3 }, { 0x004D, 0xD4 }, { 0x004E, 0xD5 }, { 0x004F, 0xD6 }
+ , { 0x0050, 0xD7 }, { 0x0051, 0xD8 }, { 0x0052, 0xD9 }, { 0x0053, 0xE2 }
+ , { 0x0054, 0xE3 }, { 0x0055, 0xE4 }, { 0x0056, 0xE5 }, { 0x0057, 0xE6 }
+ , { 0x0058, 0xE7 }, { 0x0059, 0xE8 }, { 0x005A, 0xE9 }, { 0x005B, 0xBA }
+ , { 0x005C, 0xE0 }, { 0x005D, 0xBB }, { 0x005E, 0xB0 }, { 0x005F, 0x6D }
+ , { 0x0060, 0x79 }, { 0x0061, 0x81 }, { 0x0062, 0x82 }, { 0x0063, 0x83 }
+ , { 0x0064, 0x84 }, { 0x0065, 0x85 }, { 0x0066, 0x86 }, { 0x0067, 0x87 }
+ , { 0x0068, 0x88 }, { 0x0069, 0x89 }, { 0x006A, 0x91 }, { 0x006B, 0x92 }
+ , { 0x006C, 0x93 }, { 0x006D, 0x94 }, { 0x006E, 0x95 }, { 0x006F, 0x96 }
+ , { 0x0070, 0x97 }, { 0x0071, 0x98 }, { 0x0072, 0x99 }, { 0x0073, 0xA2 }
+ , { 0x0074, 0xA3 }, { 0x0075, 0xA4 }, { 0x0076, 0xA5 }, { 0x0077, 0xA6 }
+ , { 0x0078, 0xA7 }, { 0x0079, 0xA8 }, { 0x007A, 0xA9 }, { 0x007B, 0xC0 }
+ , { 0x007C, 0x4F }, { 0x007D, 0xD0 }, { 0x007E, 0xA1 }, { 0x007F, 0x07 }
+ , { 0x0080, 0x20 }, { 0x0081, 0x21 }, { 0x0082, 0x22 }, { 0x0083, 0x23 }
+ , { 0x0084, 0x24 }, { 0x0085, 0x15 }, { 0x0086, 0x06 }, { 0x0087, 0x17 }
+ , { 0x0088, 0x28 }, { 0x0089, 0x29 }, { 0x008A, 0x2A }, { 0x008B, 0x2B }
+ , { 0x008C, 0x2C }, { 0x008D, 0x09 }, { 0x008E, 0x0A }, { 0x008F, 0x1B }
+ , { 0x0090, 0x30 }, { 0x0091, 0x31 }, { 0x0092, 0x1A }, { 0x0093, 0x33 }
+ , { 0x0094, 0x34 }, { 0x0095, 0x35 }, { 0x0096, 0x36 }, { 0x0097, 0x08 }
+ , { 0x0098, 0x38 }, { 0x0099, 0x39 }, { 0x009A, 0x3A }, { 0x009B, 0x3B }
+ , { 0x009C, 0x04 }, { 0x009D, 0x14 }, { 0x009E, 0x3E }, { 0x009F, 0xFF }
+ , { 0x00A0, 0x41 }, { 0x00A1, 0xAA }, { 0x00A2, 0x4A }, { 0x00A3, 0xB1 }
+ , { 0x00A5, 0xB2 }, { 0x00A6, 0x6A }, { 0x00A7, 0xB5 }, { 0x00A8, 0xBD }
+ , { 0x00A9, 0xB4 }, { 0x00AA, 0x9A }, { 0x00AB, 0x8A }, { 0x00AC, 0x5F }
+ , { 0x00AD, 0xCA }, { 0x00AE, 0xAF }, { 0x00AF, 0xBC }, { 0x00B0, 0x90 }
+ , { 0x00B1, 0x8F }, { 0x00B2, 0xEA }, { 0x00B3, 0xFA }, { 0x00B4, 0xBE }
+ , { 0x00B5, 0xA0 }, { 0x00B6, 0xB6 }, { 0x00B7, 0xB3 }, { 0x00B8, 0x9D }
+ , { 0x00B9, 0xDA }, { 0x00BA, 0x9B }, { 0x00BB, 0x8B }, { 0x00BC, 0xB7 }
+ , { 0x00BD, 0xB8 }, { 0x00BE, 0xB9 }, { 0x00BF, 0xAB }, { 0x00C0, 0x64 }
+ , { 0x00C1, 0x65 }, { 0x00C2, 0x62 }, { 0x00C3, 0x66 }, { 0x00C4, 0x63 }
+ , { 0x00C5, 0x67 }, { 0x00C6, 0x9E }, { 0x00C7, 0x68 }, { 0x00C8, 0x74 }
+ , { 0x00C9, 0x71 }, { 0x00CA, 0x72 }, { 0x00CB, 0x73 }, { 0x00CC, 0x78 }
+ , { 0x00CD, 0x75 }, { 0x00CE, 0x76 }, { 0x00CF, 0x77 }, { 0x00D0, 0xAC }
+ , { 0x00D1, 0x69 }, { 0x00D2, 0xED }, { 0x00D3, 0xEE }, { 0x00D4, 0xEB }
+ , { 0x00D5, 0xEF }, { 0x00D6, 0xEC }, { 0x00D7, 0xBF }, { 0x00D8, 0x80 }
+ , { 0x00D9, 0xFD }, { 0x00DA, 0xFE }, { 0x00DB, 0xFB }, { 0x00DC, 0xFC }
+ , { 0x00DD, 0xAD }, { 0x00DE, 0xAE }, { 0x00DF, 0x59 }, { 0x00E0, 0x44 }
+ , { 0x00E1, 0x45 }, { 0x00E2, 0x42 }, { 0x00E3, 0x46 }, { 0x00E4, 0x43 }
+ , { 0x00E5, 0x47 }, { 0x00E6, 0x9C }, { 0x00E7, 0x48 }, { 0x00E8, 0x54 }
+ , { 0x00E9, 0x51 }, { 0x00EA, 0x52 }, { 0x00EB, 0x53 }, { 0x00EC, 0x58 }
+ , { 0x00ED, 0x55 }, { 0x00EE, 0x56 }, { 0x00EF, 0x57 }, { 0x00F0, 0x8C }
+ , { 0x00F1, 0x49 }, { 0x00F2, 0xCD }, { 0x00F3, 0xCE }, { 0x00F4, 0xCB }
+ , { 0x00F5, 0xCF }, { 0x00F6, 0xCC }, { 0x00F7, 0xE1 }, { 0x00F8, 0x70 }
+ , { 0x00F9, 0xDD }, { 0x00FA, 0xDE }, { 0x00FB, 0xDB }, { 0x00FC, 0xDC }
+ , { 0x00FD, 0x8D }, { 0x00FE, 0x8E }, { 0x00FF, 0xDF }, { 0x203E, 0xBC }
+ , { 0x20AC, 0x9F }, { 0xFF01, 0x5A }, { 0xFF02, 0x7F }, { 0xFF03, 0x7B }
+ , { 0xFF04, 0x5B }, { 0xFF05, 0x6C }, { 0xFF06, 0x50 }, { 0xFF07, 0x7D }
+ , { 0xFF08, 0x4D }, { 0xFF09, 0x5D }, { 0xFF0A, 0x5C }, { 0xFF0B, 0x4E }
+ , { 0xFF0C, 0x6B }, { 0xFF0D, 0x60 }, { 0xFF0E, 0x4B }, { 0xFF0F, 0x61 }
+ , { 0xFF10, 0xF0 }, { 0xFF11, 0xF1 }, { 0xFF12, 0xF2 }, { 0xFF13, 0xF3 }
+ , { 0xFF14, 0xF4 }, { 0xFF15, 0xF5 }, { 0xFF16, 0xF6 }, { 0xFF17, 0xF7 }
+ , { 0xFF18, 0xF8 }, { 0xFF19, 0xF9 }, { 0xFF1A, 0x7A }, { 0xFF1B, 0x5E }
+ , { 0xFF1C, 0x4C }, { 0xFF1D, 0x7E }, { 0xFF1E, 0x6E }, { 0xFF1F, 0x6F }
+ , { 0xFF20, 0x7C }, { 0xFF21, 0xC1 }, { 0xFF22, 0xC2 }, { 0xFF23, 0xC3 }
+ , { 0xFF24, 0xC4 }, { 0xFF25, 0xC5 }, { 0xFF26, 0xC6 }, { 0xFF27, 0xC7 }
+ , { 0xFF28, 0xC8 }, { 0xFF29, 0xC9 }, { 0xFF2A, 0xD1 }, { 0xFF2B, 0xD2 }
+ , { 0xFF2C, 0xD3 }, { 0xFF2D, 0xD4 }, { 0xFF2E, 0xD5 }, { 0xFF2F, 0xD6 }
+ , { 0xFF30, 0xD7 }, { 0xFF31, 0xD8 }, { 0xFF32, 0xD9 }, { 0xFF33, 0xE2 }
+ , { 0xFF34, 0xE3 }, { 0xFF35, 0xE4 }, { 0xFF36, 0xE5 }, { 0xFF37, 0xE6 }
+ , { 0xFF38, 0xE7 }, { 0xFF39, 0xE8 }, { 0xFF3A, 0xE9 }, { 0xFF3B, 0xBA }
+ , { 0xFF3C, 0xE0 }, { 0xFF3D, 0xBB }, { 0xFF3E, 0xB0 }, { 0xFF3F, 0x6D }
+ , { 0xFF40, 0x79 }, { 0xFF41, 0x81 }, { 0xFF42, 0x82 }, { 0xFF43, 0x83 }
+ , { 0xFF44, 0x84 }, { 0xFF45, 0x85 }, { 0xFF46, 0x86 }, { 0xFF47, 0x87 }
+ , { 0xFF48, 0x88 }, { 0xFF49, 0x89 }, { 0xFF4A, 0x91 }, { 0xFF4B, 0x92 }
+ , { 0xFF4C, 0x93 }, { 0xFF4D, 0x94 }, { 0xFF4E, 0x95 }, { 0xFF4F, 0x96 }
+ , { 0xFF50, 0x97 }, { 0xFF51, 0x98 }, { 0xFF52, 0x99 }, { 0xFF53, 0xA2 }
+ , { 0xFF54, 0xA3 }, { 0xFF55, 0xA4 }, { 0xFF56, 0xA5 }, { 0xFF57, 0xA6 }
+ , { 0xFF58, 0xA7 }, { 0xFF59, 0xA8 }, { 0xFF5A, 0xA9 }, { 0xFF5B, 0xC0 }
+ , { 0xFF5C, 0x4F }, { 0xFF5D, 0xD0 }, { 0xFF5E, 0xA1 }
};
+static const unsigned int gToTableSz = 351;
@@ -116,7 +215,7 @@
// ---------------------------------------------------------------------------
XMLCh XMLIBM1140Transcoder::xlatThisOne(const XMLByte toXlat)
{
- return gIBM1140XlatTable[toXlat];
+ return gFromTable[toXlat];
}
@@ -125,8 +224,14 @@
// ---------------------------------------------------------------------------
XMLIBM1140Transcoder::XMLIBM1140Transcoder( const XMLCh* const encodingName
, const unsigned int blockSize) :
-
- XMLTranscoder(encodingName, blockSize)
+ XML256TableTranscoder
+ (
+ encodingName
+ , blockSize
+ , gFromTable
+ , gToTable
+ , gToTableSz
+ )
{
}
@@ -135,487 +240,3 @@
{
}
-
-// ---------------------------------------------------------------------------
-// XMLIBM1140Transcoder: Implementation of the transcoder API
-// ---------------------------------------------------------------------------
-bool XMLIBM1140Transcoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLIBM1140Transcoder::transcodeOne( const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If no source, give up
- if (!srcBytes)
- return 0;
-
- // We will eat one byte
- bytesEaten = 1;
-
- // And use the 0th byte as a look in our table
- return gIBM1140XlatTable[*srcData];
-}
-
-
-unsigned int
-XMLIBM1140Transcoder::transcodeXML( const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
-{
- // If debugging, make sure that the block size is legal
- #if defined(XERCES_DEBUG)
- checkBlockSize(maxChars);
- #endif
-
- //
- // Calculate the max chars we can do here. Its the lesser of the
- // max output chars and the number of chars in the source.
- //
- const unsigned int countToDo = srcCount < maxChars ? srcCount : maxChars;
-
- //
- // Loop through the count we have to do and map each char via the
- // lookup table.
- //
- const XMLByte* srcPtr = srcData;
- const XMLByte* endPtr = (srcPtr + countToDo);
- XMLCh* outPtr = toFill;
- while (srcPtr < endPtr)
- *outPtr++ = gIBM1140XlatTable[*srcPtr++];
-
- // Set the bytes eaten
- bytesEaten = countToDo;
-
- // Set the character sizes to the fixed size
- memset(charSizes, 1, countToDo);
-
- // Return the chars we transcoded
- return countToDo;
-}
-
-
-
-#if 0
-struct XlatRecord
-{
- XMLCh xmlCh;
- XMLByte ebcdicCh;
-};
-
-static XlatRecord gXlatTable[] =
-{
- { 0x0000 , 0x00 }
- , { 0x0001 , 0x01 }
- , { 0x0002 , 0x02 }
- , { 0x0003 , 0x03 }
- , { 0x0004 , 0x37 }
- , { 0x0005 , 0x2D }
- , { 0x0006 , 0x2E }
- , { 0x0007 , 0x2F }
- , { 0x0008 , 0x16 }
- , { 0x0009 , 0x05 }
- , { 0x000A , 0x25 }
- , { 0x000B , 0x0B }
- , { 0x000C , 0x0C }
- , { 0x000D , 0x0D }
- , { 0x000E , 0x0E }
- , { 0x000F , 0x0F }
- , { 0x0010 , 0x10 }
- , { 0x0011 , 0x11 }
- , { 0x0012 , 0x12 }
- , { 0x0013 , 0x13 }
- , { 0x0014 , 0x3C }
- , { 0x0015 , 0x3D }
- , { 0x0016 , 0x32 }
- , { 0x0017 , 0x26 }
- , { 0x0018 , 0x18 }
- , { 0x0019 , 0x19 }
- , { 0x001A , 0x3F }
- , { 0x001B , 0x27 }
- , { 0x001C , 0x1C }
- , { 0x001D , 0x1D }
- , { 0x001E , 0x1E }
- , { 0x001F , 0x1F }
- , { 0x0020 , 0x40 }
- , { 0xFF01 , 0x5A }
- , { 0x0021 , 0x5A }
- , { 0xFF02 , 0x7F }
- , { 0x0022 , 0x7F }
- , { 0xFF03 , 0x7B }
- , { 0x0023 , 0x7B }
- , { 0xFF04 , 0x5B }
- , { 0x0024 , 0x5B }
- , { 0xFF05 , 0x6C }
- , { 0x0025 , 0x6C }
- , { 0xFF06 , 0x50 }
- , { 0x0026 , 0x50 }
- , { 0xFF07 , 0x7D }
- , { 0x0027 , 0x7D }
- , { 0xFF08 , 0x4D }
- , { 0x0028 , 0x4D }
- , { 0xFF09 , 0x5D }
- , { 0x0029 , 0x5D }
- , { 0xFF0A , 0x5C }
- , { 0x002A , 0x5C }
- , { 0xFF0B , 0x4E }
- , { 0x002B , 0x4E }
- , { 0xFF0C , 0x6B }
- , { 0x002C , 0x6B }
- , { 0xFF0D , 0x60 }
- , { 0x002D , 0x60 }
- , { 0xFF0E , 0x4B }
- , { 0x002E , 0x4B }
- , { 0xFF0F , 0x61 }
- , { 0x002F , 0x61 }
- , { 0xFF10 , 0xF0 }
- , { 0x0030 , 0xF0 }
- , { 0xFF11 , 0xF1 }
- , { 0x0031 , 0xF1 }
- , { 0xFF12 , 0xF2 }
- , { 0x0032 , 0xF2 }
- , { 0xFF13 , 0xF3 }
- , { 0x0033 , 0xF3 }
- , { 0xFF14 , 0xF4 }
- , { 0x0034 , 0xF4 }
- , { 0xFF15 , 0xF5 }
- , { 0x0035 , 0xF5 }
- , { 0xFF16 , 0xF6 }
- , { 0x0036 , 0xF6 }
- , { 0xFF17 , 0xF7 }
- , { 0x0037 , 0xF7 }
- , { 0xFF18 , 0xF8 }
- , { 0x0038 , 0xF8 }
- , { 0xFF19 , 0xF9 }
- , { 0x0039 , 0xF9 }
- , { 0xFF1A , 0x7A }
- , { 0x003A , 0x7A }
- , { 0xFF1B , 0x5E }
- , { 0x003B , 0x5E }
- , { 0xFF1C , 0x4C }
- , { 0x003C , 0x4C }
- , { 0xFF1D , 0x7E }
- , { 0x003D , 0x7E }
- , { 0xFF1E , 0x6E }
- , { 0x003E , 0x6E }
- , { 0xFF1F , 0x6F }
- , { 0x003F , 0x6F }
- , { 0xFF20 , 0x7C }
- , { 0x0040 , 0x7C }
- , { 0xFF21 , 0xC1 }
- , { 0x0041 , 0xC1 }
- , { 0xFF22 , 0xC2 }
- , { 0x0042 , 0xC2 }
- , { 0xFF23 , 0xC3 }
- , { 0x0043 , 0xC3 }
- , { 0xFF24 , 0xC4 }
- , { 0x0044 , 0xC4 }
- , { 0xFF25 , 0xC5 }
- , { 0x0045 , 0xC5 }
- , { 0xFF26 , 0xC6 }
- , { 0x0046 , 0xC6 }
- , { 0xFF27 , 0xC7 }
- , { 0x0047 , 0xC7 }
- , { 0xFF28 , 0xC8 }
- , { 0x0048 , 0xC8 }
- , { 0xFF29 , 0xC9 }
- , { 0x0049 , 0xC9 }
- , { 0xFF2A , 0xD1 }
- , { 0x004A , 0xD1 }
- , { 0xFF2B , 0xD2 }
- , { 0x004B , 0xD2 }
- , { 0xFF2C , 0xD3 }
- , { 0x004C , 0xD3 }
- , { 0xFF2D , 0xD4 }
- , { 0x004D , 0xD4 }
- , { 0xFF2E , 0xD5 }
- , { 0x004E , 0xD5 }
- , { 0xFF2F , 0xD6 }
- , { 0x004F , 0xD6 }
- , { 0xFF30 , 0xD7 }
- , { 0x0050 , 0xD7 }
- , { 0xFF31 , 0xD8 }
- , { 0x0051 , 0xD8 }
- , { 0xFF32 , 0xD9 }
- , { 0x0052 , 0xD9 }
- , { 0xFF33 , 0xE2 }
- , { 0x0053 , 0xE2 }
- , { 0xFF34 , 0xE3 }
- , { 0x0054 , 0xE3 }
- , { 0xFF35 , 0xE4 }
- , { 0x0055 , 0xE4 }
- , { 0xFF36 , 0xE5 }
- , { 0x0056 , 0xE5 }
- , { 0xFF37 , 0xE6 }
- , { 0x0057 , 0xE6 }
- , { 0xFF38 , 0xE7 }
- , { 0x0058 , 0xE7 }
- , { 0xFF39 , 0xE8 }
- , { 0x0059 , 0xE8 }
- , { 0xFF3A , 0xE9 }
- , { 0x005A , 0xE9 }
- , { 0xFF3B , 0xBA }
- , { 0x005B , 0xBA }
- , { 0xFF3C , 0xE0 }
- , { 0x005C , 0xE0 }
- , { 0xFF3D , 0xBB }
- , { 0x005D , 0xBB }
- , { 0xFF3E , 0xB0 }
- , { 0x005E , 0xB0 }
- , { 0xFF3F , 0x6D }
- , { 0x005F , 0x6D }
- , { 0xFF40 , 0x79 }
- , { 0x0060 , 0x79 }
- , { 0xFF41 , 0x81 }
- , { 0x0061 , 0x81 }
- , { 0xFF42 , 0x82 }
- , { 0x0062 , 0x82 }
- , { 0xFF43 , 0x83 }
- , { 0x0063 , 0x83 }
- , { 0xFF44 , 0x84 }
- , { 0x0064 , 0x84 }
- , { 0xFF45 , 0x85 }
- , { 0x0065 , 0x85 }
- , { 0xFF46 , 0x86 }
- , { 0x0066 , 0x86 }
- , { 0xFF47 , 0x87 }
- , { 0x0067 , 0x87 }
- , { 0xFF48 , 0x88 }
- , { 0x0068 , 0x88 }
- , { 0xFF49 , 0x89 }
- , { 0x0069 , 0x89 }
- , { 0xFF4A , 0x91 }
- , { 0x006A , 0x91 }
- , { 0xFF4B , 0x92 }
- , { 0x006B , 0x92 }
- , { 0xFF4C , 0x93 }
- , { 0x006C , 0x93 }
- , { 0xFF4D , 0x94 }
- , { 0x006D , 0x94 }
- , { 0xFF4E , 0x95 }
- , { 0x006E , 0x95 }
- , { 0xFF4F , 0x96 }
- , { 0x006F , 0x96 }
- , { 0xFF50 , 0x97 }
- , { 0x0070 , 0x97 }
- , { 0xFF51 , 0x98 }
- , { 0x0071 , 0x98 }
- , { 0xFF52 , 0x99 }
- , { 0x0072 , 0x99 }
- , { 0xFF53 , 0xA2 }
- , { 0x0073 , 0xA2 }
- , { 0xFF54 , 0xA3 }
- , { 0x0074 , 0xA3 }
- , { 0xFF55 , 0xA4 }
- , { 0x0075 , 0xA4 }
- , { 0xFF56 , 0xA5 }
- , { 0x0076 , 0xA5 }
- , { 0xFF57 , 0xA6 }
- , { 0x0077 , 0xA6 }
- , { 0xFF58 , 0xA7 }
- , { 0x0078 , 0xA7 }
- , { 0xFF59 , 0xA8 }
- , { 0x0079 , 0xA8 }
- , { 0xFF5A , 0xA9 }
- , { 0x007A , 0xA9 }
- , { 0xFF5B , 0xC0 }
- , { 0x007B , 0xC0 }
- , { 0xFF5C , 0x4F }
- , { 0x007C , 0x4F }
- , { 0xFF5D , 0xD0 }
- , { 0x007D , 0xD0 }
- , { 0xFF5E , 0xA1 }
- , { 0x007E , 0xA1 }
- , { 0x007F , 0x07 }
- , { 0x0080 , 0x20 }
- , { 0x0081 , 0x21 }
- , { 0x0082 , 0x22 }
- , { 0x0083 , 0x23 }
- , { 0x0084 , 0x24 }
- , { 0x0085 , 0x15 }
- , { 0x0086 , 0x06 }
- , { 0x0087 , 0x17 }
- , { 0x0088 , 0x28 }
- , { 0x0089 , 0x29 }
- , { 0x008A , 0x2A }
- , { 0x008B , 0x2B }
- , { 0x008C , 0x2C }
- , { 0x008D , 0x09 }
- , { 0x008E , 0x0A }
- , { 0x008F , 0x1B }
- , { 0x0090 , 0x30 }
- , { 0x0091 , 0x31 }
- , { 0x0092 , 0x1A }
- , { 0x0093 , 0x33 }
- , { 0x0094 , 0x34 }
- , { 0x0095 , 0x35 }
- , { 0x0096 , 0x36 }
- , { 0x0097 , 0x08 }
- , { 0x0098 , 0x38 }
- , { 0x0099 , 0x39 }
- , { 0x009A , 0x3A }
- , { 0x009B , 0x3B }
- , { 0x009C , 0x04 }
- , { 0x009D , 0x14 }
- , { 0x009E , 0x3E }
- , { 0x009F , 0xFF }
- , { 0x00A0 , 0x41 }
- , { 0x00A1 , 0xAA }
- , { 0x00A2 , 0x4A }
- , { 0x00A3 , 0xB1 }
- , { 0x00A5 , 0xB2 }
- , { 0x00A6 , 0x6A }
- , { 0x00A7 , 0xB5 }
- , { 0x00A8 , 0xBD }
- , { 0x00A9 , 0xB4 }
- , { 0x00AA , 0x9A }
- , { 0x00AB , 0x8A }
- , { 0x00AC , 0x5F }
- , { 0x00AD , 0xCA }
- , { 0x00AE , 0xAF }
- , { 0x203E , 0xBC }
- , { 0x00AF , 0xBC }
- , { 0x00B0 , 0x90 }
- , { 0x00B1 , 0x8F }
- , { 0x00B2 , 0xEA }
- , { 0x00B3 , 0xFA }
- , { 0x00B4 , 0xBE }
- , { 0x00B5 , 0xA0 }
- , { 0x00B6 , 0xB6 }
- , { 0x00B7 , 0xB3 }
- , { 0x00B8 , 0x9D }
- , { 0x00B9 , 0xDA }
- , { 0x00BA , 0x9B }
- , { 0x00BB , 0x8B }
- , { 0x00BC , 0xB7 }
- , { 0x00BD , 0xB8 }
- , { 0x00BE , 0xB9 }
- , { 0x00BF , 0xAB }
- , { 0x00C0 , 0x64 }
- , { 0x00C1 , 0x65 }
- , { 0x00C2 , 0x62 }
- , { 0x00C3 , 0x66 }
- , { 0x00C4 , 0x63 }
- , { 0x00C5 , 0x67 }
- , { 0x00C6 , 0x9E }
- , { 0x00C7 , 0x68 }
- , { 0x00C8 , 0x74 }
- , { 0x00C9 , 0x71 }
- , { 0x00CA , 0x72 }
- , { 0x00CB , 0x73 }
- , { 0x00CC , 0x78 }
- , { 0x00CD , 0x75 }
- , { 0x00CE , 0x76 }
- , { 0x00CF , 0x77 }
- , { 0x00D0 , 0xAC }
- , { 0x00D1 , 0x69 }
- , { 0x00D2 , 0xED }
- , { 0x00D3 , 0xEE }
- , { 0x00D4 , 0xEB }
- , { 0x00D5 , 0xEF }
- , { 0x00D6 , 0xEC }
- , { 0x00D7 , 0xBF }
- , { 0x00D8 , 0x80 }
- , { 0x00D9 , 0xFD }
- , { 0x00DA , 0xFE }
- , { 0x00DB , 0xFB }
- , { 0x00DC , 0xFC }
- , { 0x00DD , 0xAD }
- , { 0x00DE , 0xAE }
- , { 0x00DF , 0x59 }
- , { 0x00E0 , 0x44 }
- , { 0x00E1 , 0x45 }
- , { 0x00E2 , 0x42 }
- , { 0x00E3 , 0x46 }
- , { 0x00E4 , 0x43 }
- , { 0x00E5 , 0x47 }
- , { 0x00E6 , 0x9C }
- , { 0x00E7 , 0x48 }
- , { 0x00E8 , 0x54 }
- , { 0x00E9 , 0x51 }
- , { 0x00EA , 0x52 }
- , { 0x00EB , 0x53 }
- , { 0x00EC , 0x58 }
- , { 0x00ED , 0x55 }
- , { 0x00EE , 0x56 }
- , { 0x00EF , 0x57 }
- , { 0x00F0 , 0x8C }
- , { 0x00F1 , 0x49 }
- , { 0x00F2 , 0xCD }
- , { 0x00F3 , 0xCE }
- , { 0x00F4 , 0xCB }
- , { 0x00F5 , 0xCF }
- , { 0x00F6 , 0xCC }
- , { 0x00F7 , 0xE1 }
- , { 0x00F8 , 0x70 }
- , { 0x00F9 , 0xDD }
- , { 0x00FA , 0xDE }
- , { 0x00FB , 0xDB }
- , { 0x00FC , 0xDC }
- , { 0x00FD , 0x8D }
- , { 0x00FE , 0x8E }
- , { 0x00FF , 0xDF }
- , { 0x20AC , 0x9F }
-};
-
-#include <search.h>
-#include <stdio.h>
-int compFunc(const void* p1, const void* p2)
-{
- const XlatRecord* rec1 = (const XlatRecord*)p1;
- const XlatRecord* rec2 = (const XlatRecord*)p2;
-
- return (int)rec1->ebcdicCh - (int)rec2->ebcdicCh;
-}
-
-class SpitOutTable
-{
-public :
- SpitOutTable()
- {
- spitOutTable();
- }
-
- void spitOutTable()
- {
- const unsigned int recCount = sizeof(gXlatTable) / sizeof(gXlatTable[0]);
- qsort
- (
- gXlatTable
- , recCount
- , sizeof(XlatRecord)
- , compFunc
- );
-
- unsigned int curValue = 0;
- for (unsigned int index = 0; index < recCount; index++)
- {
- if (gXlatTable[index].ebcdicCh == curValue)
- {
- printf("0x%04X\n", (unsigned int)gXlatTable[index].xmlCh);
- curValue++;
- }
- else
- {
- // We've hit a gap, so catch up
- while (curValue < gXlatTable[index].ebcdicCh)
- {
- printf("0xFFFF\n");
- curValue++;
- }
- }
- }
- }
-};
-
-SpitOutTable kicker;
-
-#endif
1.3 +3 -25 xml-xerces/c/src/util/XMLIBM1140Transcoder.hpp
Index: XMLIBM1140Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLIBM1140Transcoder.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLIBM1140Transcoder.hpp 2000/03/02 19:54:48 1.2
+++ XMLIBM1140Transcoder.hpp 2000/03/17 23:59:54 1.3
@@ -58,7 +58,7 @@
#define XMLIBM1140TRANSCODER_HPP
#include <util/XercesDefs.hpp>
-#include <util/TransService.hpp>
+#include <util/XML256TableTranscoder.hpp>
//
@@ -69,7 +69,7 @@
// transcoders using the same transcoder abstraction as the pluggable
// transcoding services do.
//
-class XMLUTIL_EXPORT XMLIBM1140Transcoder : public XMLTranscoder
+class XMLUTIL_EXPORT XMLIBM1140Transcoder : public XML256TableTranscoder
{
public :
// -----------------------------------------------------------------------
@@ -90,33 +90,11 @@
virtual ~XMLIBM1140Transcoder();
- // -----------------------------------------------------------------------
- // Implementation of the XMLTranscoder interface
- // -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
- (
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
- const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes
- );
-
-
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
+ XMLIBM1140Transcoder();
XMLIBM1140Transcoder(const XMLIBM1140Transcoder&);
void operator=(const XMLIBM1140Transcoder&);
};
1.4 +16 -16 xml-xerces/c/src/util/XMLUCS4Transcoder.hpp
Index: XMLUCS4Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUCS4Transcoder.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLUCS4Transcoder.hpp 2000/03/02 19:54:49 1.3
+++ XMLUCS4Transcoder.hpp 2000/03/17 23:59:54 1.4
@@ -88,17 +88,8 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -107,7 +98,22 @@
, unsigned char* const charSizes
);
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
+
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
@@ -119,16 +125,10 @@
// -----------------------------------------------------------------------
// Private data members
//
- // fSpareCh
- // If we decode a surrogate pair, and only have space for one of
- // the values in the output, then we have to store the trailing
- // value until the next time.
- //
// fSwapped
// This tells us if our input is going to be in the same endianess
// as the local host or swapped.
// -----------------------------------------------------------------------
- XMLCh fSpareCh;
bool fSwapped;
};
1.4 +158 -123 xml-xerces/c/src/util/XMLUCSTranscoder.cpp
Index: XMLUCSTranscoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUCSTranscoder.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLUCSTranscoder.cpp 2000/03/02 19:54:49 1.3
+++ XMLUCSTranscoder.cpp 2000/03/17 23:59:54 1.4
@@ -73,7 +73,6 @@
, const bool swapped) :
XMLTranscoder(encodingName, blockSize)
- , fSpareCh(0)
, fSwapped(swapped)
{
}
@@ -87,163 +86,199 @@
// ---------------------------------------------------------------------------
// XMLUCS4Transcoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XMLUCS4Transcoder::supportsSrcOfs() const
+unsigned int
+XMLUCS4Transcoder::transcodeFrom(const XMLByte* const srcData
+ , const unsigned int srcCount
+ , XMLCh* const toFill
+ , const unsigned int maxChars
+ , unsigned int& bytesEaten
+ , unsigned char* const charSizes)
{
- // Yes we support this
- return true;
-}
-
+ // If debugging, make sure that the block size is legal
+ #if defined(XERCES_DEBUG)
+ checkBlockSize(maxChars);
+ #endif
-XMLCh
-XMLUCS4Transcoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If there is a spare char, return it first
- if (fSpareCh)
- {
- const XMLCh retCh = fSpareCh;
- fSpareCh = 0;
- return retCh;
- }
+ //
+ // Get pointers to the start and end of the source buffer in terms of
+ // UCS-4 characters.
+ //
+ const UCS4Ch* srcPtr = (const UCS4Ch*)srcData;
+ const UCS4Ch* srcEnd = srcPtr + (srcCount / sizeof(UCS4Ch));
- // If not enough bytes for an input char, return zero
- if (srcBytes < sizeof(UCS4Ch))
- return 0;
+ //
+ // Get pointers to the start and end of the target buffer, which is
+ // in terms of the XMLCh chars we output.
+ //
+ XMLCh* outPtr = toFill;
+ XMLCh* outEnd = toFill + maxChars;
//
- // Get the next char. If the source is swapped from native format,
- // unswap it
+ // And get a pointer into the char sizes buffer. We will run this
+ // up as we put chars into the output buffer.
//
- UCS4Ch nextCh = *((const UCS4Ch*)srcData);
- if (fSwapped)
- nextCh = BitOps::swapBytes(nextCh);
+ unsigned char* sizePtr = charSizes;
//
- // See if this requires a surrogate pair to store. If so, then we
- // return the first and save the next. Else just return the one
- // resulting char.
+ // Now process chars until we either use up all our source or all of
+ // our output space.
//
- XMLCh retCh;
- if (nextCh & 0xFFFF0000)
+ while ((outPtr < outEnd) && (srcPtr < srcEnd))
{
- const XMLCh ch1 = XMLCh(((nextCh - 0x10000) >> 10) + 0xD800);
- const XMLCh ch2 = XMLCh(((nextCh - 0x10000) & 0x3FF) + 0xDC00);
+ //
+ // Get the next UCS char out of the buffer. Don't bump the ptr
+ // yet since we might not have enough storage for it in the target
+ // (if its causes a surrogate pair to be created.
+ //
+ UCS4Ch nextVal = *srcPtr;
- retCh = ch1;
- fSpareCh = ch2;
- }
- else
- {
- // No surrogate, so just cast it to the correct type
- retCh = XMLCh(nextCh);
+ // If it needs to be swapped, then do it
+ if (fSwapped)
+ nextVal = BitOps::swapBytes(nextVal);
+
+ // Handle a surrogate pair if needed
+ if (nextVal & 0xFFFF0000)
+ {
+ //
+ // If we don't have room for both of the chars, then we
+ // bail out now.
+ //
+ if (outPtr + 1 == outEnd)
+ break;
+
+ const XMLCh ch1 = XMLCh(((nextVal - 0x10000) >> 10) + 0xD800);
+ const XMLCh ch2 = XMLCh(((nextVal - 0x10000) & 0x3FF) + 0xDC00);
+
+ //
+ // We have room so store them both. But note that the
+ // second one took up no source bytes!
+ //
+ *sizePtr++ = sizeof(UCS4Ch);
+ *outPtr++ = ch1;
+ *sizePtr++ = 0;
+ *outPtr++ = ch2;
+ }
+ else
+ {
+ //
+ // No surrogate, so just store it and bump the count of chars
+ // read. Update the char sizes buffer for this char's entry.
+ //
+ *sizePtr++ = sizeof(UCS4Ch);
+ *outPtr++ = XMLCh(nextVal);
+ }
+
+ // Indicate that we ate another UCS char's worth of bytes
+ srcPtr++;
}
+
+ // Set the bytes eaten parameter
+ bytesEaten = ((const XMLByte*)srcPtr) - srcData;
- // We ate one UCS4 char's worth of bytes
- bytesEaten = sizeof(UCS4Ch);
- return retCh;
+ // And return the chars written into the output buffer
+ return outPtr - toFill;
}
unsigned int
-XMLUCS4Transcoder::transcodeXML(const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
+XMLUCS4Transcoder::transcodeTo( const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
{
// If debugging, make sure that the block size is legal
#if defined(XERCES_DEBUG)
- checkBlockSize(maxChars);
+ checkBlockSize(maxBytes);
#endif
- // This will be the index into the output buffer and init the bytes eaten
- unsigned int charsRead = 0;
- bytesEaten = 0;
+ //
+ // Get pointers to the start and end of the source buffer, which
+ // is in terms of XMLCh chars.
+ //
+ const XMLCh* srcPtr = srcData;
+ const XMLCh* srcEnd = srcData + srcCount;
//
- // If there is a spare character, then we have to take that one first
- // being sure to bump the chars read.
+ // Get pointers to the start and end of the target buffer, in terms
+ // of UCS-4 chars.
//
- if (fSpareCh)
- {
- //
- // This char was a trailing surrogate so it took no space from
- // the original source itself. The leading surrogate accounted
- // for all the source eaten.
- //
- charSizes[charsRead] = 0;
- toFill[charsRead++] = fSpareCh;
- fSpareCh = chNull;
- }
+ UCS4Ch* outPtr = (UCS4Ch*)toFill;
+ UCS4Ch* outEnd = outPtr + (maxBytes / sizeof(UCS4Ch));
//
- // Calculate how many UCS-4 characters could possibly be pulled out
- // of the raw buffer right now. If none, return zero. Shouldn't happen
- // unless an odd number of bytes is in the buffer, since an empty
- // buffer would have been refilled before we were called.
- //
- const unsigned int charsAvail = (srcCount / sizeof(UCS4Ch));
- if (!charsAvail)
- return 0;
-
- //
- // Calculate the maximum chars we can do. Its the lesser of the chars
- // requested and the UCS-4 chars available in the buffer. We have to
- // account for the possibility that we used one target position on
- // the trailing surrogate above.
- //
- const unsigned int charsToDo = ((maxChars - charsRead) < charsAvail) ?
- (maxChars - charsRead): charsAvail;
-
- // Just loop until we get the max chars we need or run out of source
- const UCS4Ch* asUCS4 = (const UCS4Ch*)srcData;
- while (charsRead < charsToDo)
+ // Now loop until we either run out of source characters or we
+ // fill up our output buffer.
+ //
+ XMLCh trailCh;
+ while ((outPtr < outEnd) && (srcPtr < srcEnd))
{
- // Get the next int out of the buffer
- UCS4Ch nextVal = *asUCS4++;
- bytesEaten += sizeof(UCS4Ch);
-
- // If it needs to be swapped, then do it
- if (fSwapped)
- nextVal = BitOps::swapBytes(nextVal);
+ //
+ // Get out an XMLCh char from the source. Don't bump up the
+ // pointer yet, since it might be a leading for which we don't
+ // have the trailing.
+ //
+ const XMLCh curCh = *srcPtr;
- // Handle a surrogate pair if needed
- if (nextVal & 0xFFFF0000)
+ //
+ // If its a leading char of a surrogate pair handle it one way,
+ // else just cast it over into the target.
+ //
+ if ((curCh >= 0xD800) && (curCh <= 0xDBFF))
{
- const XMLCh ch1 = XMLCh(((nextVal - 0x10000) >> 10) + 0xD800);
- const XMLCh ch2 = XMLCh(((nextVal - 0x10000) & 0x3FF) + 0xDC00);
+ //
+ // Ok, we have to have another source char available or we
+ // just give up without eating the leading char.
+ //
+ if (srcPtr + 1 == srcEnd)
+ break;
+ //
+ // We have the trailing char, so eat the first char and the
+ // trailing char from the source.
+ //
+ srcPtr++;
+ trailCh = *srcPtr++;
+
+ //
+ // Then make sure its a legal trailing char. If not, throw
+ // an exception.
//
- // If we have room for two chars, then put them both in and bump
- // the chars read by two. Otherwise, put one in and store the
- // other in the spare char for the next round.
- //
- if (charsRead + 1 == maxChars)
- {
- charSizes[charsRead] = sizeof(UCS4Ch);
- toFill[charsRead++] = ch1;
- fSpareCh = ch2;
- }
- else
- {
- //
- // We have room so store them both. But note that the
- // second one took up no source bytes!
- //
- charSizes[charsRead] = sizeof(UCS4Ch);
- toFill[charsRead++] = ch1;
- charSizes[charsRead] = 0;
- toFill[charsRead++] = ch2;
- }
+ ThrowXML(TranscodingException, XMLExcepts::Trans_BadTrailingSurrogate);
+
+ // And now combine the two into a single output char
+ *outPtr++ = ((curCh - 0xD800) << 10)
+ + (trailCh - 0xDC00) + 0x10000;
}
else
{
- // No surrogate, so just store it and bump the count
- charSizes[charsRead] = sizeof(UCS4Ch);
- toFill[charsRead++] = XMLCh(nextVal);
+ //
+ // Its just a char, so we can take it as is. If we need to
+ // swap it, then swap it. Because of flakey compilers, use
+ // a temp first.
+ //
+ const UCS4Ch tmpCh = UCS4Ch(curCh);
+ if (fSwapped)
+ *outPtr++ = BitOps::swapBytes(tmpCh);
+ else
+ *outPtr++ = tmpCh;
+
+ // Bump the source pointer
+ srcPtr++;
}
}
- return charsRead;
+
+ // Set the chars we ate from the source
+ charsEaten = srcPtr - srcData;
+
+ // Return the bytes we wrote to the output
+ return ((XMLByte*)outPtr) - toFill;
+}
+
+
+bool XMLUCS4Transcoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ // We can handle anything
+ return true;
}
1.9 +8 -8 xml-xerces/c/src/util/XMLURL.cpp
Index: XMLURL.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLURL.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XMLURL.cpp 2000/03/02 19:54:49 1.8
+++ XMLURL.cpp 2000/03/17 23:59:55 1.9
@@ -56,6 +56,9 @@
/*
* $Log: XMLURL.cpp,v $
+ * Revision 1.9 2000/03/17 23:59:55 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.8 2000/03/02 19:54:49 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -675,10 +678,7 @@
{
// The base URL cannot be relative
if (baseURL.isRelative())
- {
- // <TBD> Add an error for this
- // ThrowXML(MalformedURLException, XMLExcepts::URL_BaseWasRelative);
- }
+ ThrowXML(MalformedURLException, XMLExcepts::URL_RelativeBaseURL);
//
// Check a special case. If all we have is a fragment, then we want
@@ -1093,11 +1093,9 @@
basePtr--;
}
+ // There are not enough levels to handle all the .. parts
if (basePtr < basePart)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(MalformedURLException, XMLExcepts::URL_BaseUnderflow);
}
}
1.4 +93 -38 xml-xerces/c/src/util/XMLUTF16Transcoder.cpp
Index: XMLUTF16Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUTF16Transcoder.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLUTF16Transcoder.cpp 2000/03/02 19:54:49 1.3
+++ XMLUTF16Transcoder.cpp 2000/03/17 23:59:55 1.4
@@ -86,42 +86,13 @@
// ---------------------------------------------------------------------------
// XMLUTF16Transcoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XMLUTF16Transcoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLUTF16Transcoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If not enough source bytes, return zero
- if (srcBytes < sizeof(UTF16Ch))
- return 0;
-
- // We are going to eat one UTF16 char's worth of bytes
- bytesEaten = sizeof(UTF16Ch);
-
- // Get the byte out and swap it if needed
- UTF16Ch nextCh = *((const UTF16Ch*)srcData);
- if (fSwapped)
- nextCh = BitOps::swapBytes(nextCh);
-
- // And return the value, cast to an XMLCh
- return XMLCh(nextCh);
-}
-
-
unsigned int
-XMLUTF16Transcoder::transcodeXML(const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
+XMLUTF16Transcoder::transcodeFrom( const XMLByte* const srcData
+ , const unsigned int srcCount
+ , XMLCh* const toFill
+ , const unsigned int maxChars
+ , unsigned int& bytesEaten
+ , unsigned char* const charSizes)
{
// If debugging, make sure that the block size is legal
#if defined(XERCES_DEBUG)
@@ -138,6 +109,9 @@
// Look at the source data as UTF16 chars
const UTF16Ch* asUTF16 = (const UTF16Ch*)srcData;
+ // And get a mutable pointer to the output
+ XMLCh* outPtr = toFill;
+
//
// If its swapped, we have to do a char by char swap and cast. Else
// we have to check whether our XMLCh and UTF16Ch types are the same
@@ -148,10 +122,10 @@
//
// And then do the swapping loop for the count we precalculated. Note
// that this also handles size conversion as well if XMLCh is not the
- // same size as UTF16Char.
+ // same size as UTF16Ch.
//
for (unsigned int index = 0; index < countToDo; index++)
- toFill[index] = BitOps::swapBytes(*asUTF16++);
+ *outPtr++ = BitOps::swapBytes(*asUTF16++);
}
else
{
@@ -170,7 +144,7 @@
else
{
for (unsigned int index = 0; index < countToDo; index++)
- toFill[index] = XMLCh(*asUTF16++);
+ *outPtr++ = XMLCh(*asUTF16++);
}
}
@@ -182,4 +156,85 @@
// Return the chars we transcoded
return countToDo;
+}
+
+
+unsigned int
+XMLUTF16Transcoder::transcodeTo(const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // If debugging, make sure that the block size is legal
+ #if defined(XERCES_DEBUG)
+ checkBlockSize(maxBytes);
+ #endif
+
+ //
+ // Calculate the max chars we can do here. Its the lesser of the
+ // chars that we can fit into the output buffer, and the source
+ // chars available.
+ //
+ const unsigned int maxOutChars = maxBytes / sizeof(UTF16Ch);
+ const unsigned int countToDo = srcCount < maxOutChars ? srcCount : maxOutChars;
+
+ //
+ // Get a pointer tot he output buffer in the UTF-16 character format
+ // that we need to work with. And get a mutable pointer to the source
+ // character buffer.
+ //
+ UTF16Ch* outPtr = (UTF16Ch*)toFill;
+ const XMLCh* srcPtr = srcData;
+
+ //
+ // If the target format is swapped from our native format, then handle
+ // it one way, else handle it another.
+ //
+ if (fSwapped)
+ {
+ //
+ // And then do the swapping loop for the count we precalculated. Note
+ // that this also handles size conversion as well if XMLCh is not the
+ // same size as UTF16Ch.
+ //
+ for (unsigned int index = 0; index < countToDo; index++)
+ {
+ // To avoid flakey compilers, use a temp
+ const UTF16Ch tmpCh = UTF16Ch(*srcPtr++);
+ *outPtr++ = BitOps::swapBytes(tmpCh);
+ }
+ }
+ else
+ {
+ //
+ // If XMLCh and UTF16Ch are the same size, we can just do a fast
+ // memory copy. Otherwise, we have to do a loop and downcast each
+ // character into its new 16 bit storage.
+ //
+ if (sizeof(XMLCh) == sizeof(UTF16Ch))
+ {
+ // Notice we convert char count to byte count here!!!
+ memcpy(toFill, srcData, countToDo * sizeof(UTF16Ch));
+ }
+ else
+ {
+ for (unsigned int index = 0; index < countToDo; index++)
+ *outPtr++ = UTF16Ch(*srcPtr++);
+ }
+ }
+
+ // Set the chars eaten to the calculated number we ate
+ charsEaten = countToDo;
+
+ //Return the bytes we ate. Note we convert to a byte count here!
+ return countToDo * sizeof(UTF16Ch);
+}
+
+
+bool XMLUTF16Transcoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ // We can handle anything
+ return true;
}
1.4 +16 -10 xml-xerces/c/src/util/XMLUTF16Transcoder.hpp
Index: XMLUTF16Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUTF16Transcoder.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLUTF16Transcoder.hpp 2000/03/02 19:54:49 1.3
+++ XMLUTF16Transcoder.hpp 2000/03/17 23:59:55 1.4
@@ -88,17 +88,8 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -106,6 +97,21 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
private :
1.6 +201 -87 xml-xerces/c/src/util/XMLUTF8Transcoder.cpp
Index: XMLUTF8Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUTF8Transcoder.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLUTF8Transcoder.cpp 2000/03/13 21:21:22 1.5
+++ XMLUTF8Transcoder.cpp 2000/03/17 23:59:55 1.6
@@ -58,6 +58,8 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
+#include <util/TranscodingException.hpp>
+#include <util/XMLString.hpp>
#include <util/XMLUTF8Transcoder.hpp>
#include <util/UTFDataFormatException.hpp>
@@ -71,6 +73,10 @@
// gUTFOffsets
// A list of values to offset each result char type, according to how
// many source bytes when into making it.
+//
+// gFirstByteMark
+// A list of values to mask onto the first byte of an encoded sequence,
+// indexed by the number of bytes used to create the sequence.
// ---------------------------------------------------------------------------
static const XMLByte gUTFBytes[256] =
{
@@ -94,9 +100,13 @@
static const XMLUInt32 gUTFOffsets[6] =
{
- 0, 0x3080, 0xE2080, 0x3C82080, 0xFA082080, 0x82022080
+ 0, 0x3080, 0xE2080, 0x3C82080, 0xFA082080, 0x82082080
};
+static const XMLByte gFirstByteMark[7] =
+{
+ 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC
+};
@@ -107,7 +117,6 @@
, const unsigned int blockSize) :
XMLTranscoder(encodingName, blockSize)
- , fSpareCh(0)
{
}
@@ -119,101 +128,63 @@
// ---------------------------------------------------------------------------
// XMLUTF8Transcoder: Implementation of the transcoder API
// ---------------------------------------------------------------------------
-bool XMLUTF8Transcoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLUTF8Transcoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If there is a spare char, then do that first
- if (fSpareCh)
- {
- const XMLCh retCh = fSpareCh;
- fSpareCh = 0;
- return retCh;
- }
-
- // If there are no bytes, then give up now
- if (!srcBytes)
- return 0;
-
- // Just call the other version with a max of one output character
- XMLCh chTarget;
- unsigned char dummy;
- if (!transcodeXML(srcData, srcBytes, &chTarget, 1, bytesEaten, &dummy))
- return 0;
-
- return chTarget;
-}
-
-
unsigned int
-XMLUTF8Transcoder::transcodeXML(const XMLByte* const srcData
+XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
, const unsigned int maxChars
, unsigned int& bytesEaten
, unsigned char* const charSizes)
{
+ // Watch for pathological scenario. Shouldn't happen, but...
+ if (!srcCount || !maxChars)
+ return 0;
+
// If debugging, make sure that the block size is legal
#if defined(XERCES_DEBUG)
checkBlockSize(maxChars);
#endif
- // This will track the target chars we've transcoded out so far
- unsigned int charsRead = 0;
-
//
- // If we have a spare, then store it first and zero out the spare.
- // Be sure to bump the count of chars read.
+ // Get pointers to our start and end points of the input and output
+ // buffers.
//
- if (fSpareCh)
- {
- //
- // A spare is a trailing surrogate. So it actually takes up no
- // space in the source data. Its leading surrogate accounted for
- // all the bytes eaten.
- //
- charSizes[charsRead] = 0;
- toFill[charsRead++] = fSpareCh;
- fSpareCh = 0;
- }
+ const XMLByte* srcPtr = srcData;
+ const XMLByte* srcEnd = srcPtr + srcCount;
+ XMLCh* outPtr = toFill;
+ XMLCh* outEnd = outPtr + maxChars;
+ unsigned char* sizePtr = charSizes;
//
- // Just loop until we run out of input or hit the max chars that
- // was requested.
+ // We now loop until we either run out of input data, or room to store
+ // output chars.
//
- bytesEaten = 0;
- const XMLByte* srcPtr = srcData;
- while (charsRead < maxChars)
+ while ((srcPtr < srcEnd) && (outPtr < outEnd))
{
- // Special-case ASCII, which is a leading byte value of <= 127
+ // Get the next leading byte out
const XMLByte firstByte = *srcPtr;
+
+ // Special-case ASCII, which is a leading byte value of <= 127
if (firstByte <= 127)
{
- toFill[charsRead++] = XMLCh(firstByte);
+ *outPtr++ = XMLCh(firstByte);
srcPtr++;
- bytesEaten++;
- if (bytesEaten >= srcCount)
- break;
+ *sizePtr++ = 1;
continue;
}
-
// See how many trailing src bytes this sequence is going to require
- const unsigned int trailingBytes = gUTFBytes[*srcPtr];
+ const unsigned int trailingBytes = gUTFBytes[firstByte];
//
// If there are not enough source bytes to do this one, then we
- // are done.
+ // are done. Note that we done >= here because we are implicitly
+ // counting the 1 byte we get no matter what.
+ //
+ // If we break out here, then there is nothing to undo since we
+ // haven't updated any pointers yet.
//
- if (bytesEaten + trailingBytes >= srcCount)
+ if (srcPtr + trailingBytes >= srcEnd)
break;
// Looks ok, so lets build up the value
@@ -226,6 +197,10 @@
case 2 : tmpVal += *srcPtr++; tmpVal <<= 6;
case 1 : tmpVal += *srcPtr++; tmpVal <<= 6;
case 0 : tmpVal += *srcPtr++;
+ break;
+
+ default :
+ ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
}
tmpVal -= gUTFOffsets[trailingBytes];
@@ -236,8 +211,8 @@
//
if (!(tmpVal & 0xFFFF0000))
{
- charSizes[charsRead] = trailingBytes + 1;
- toFill[charsRead++] = XMLCh(tmpVal);
+ *sizePtr++ = trailingBytes + 1;
+ *outPtr++ = XMLCh(tmpVal);
}
else if (tmpVal > 0x10FFFF)
{
@@ -248,37 +223,176 @@
// way, the error will have a line and col number closer to
// the real problem area.
//
- if (charsRead > 32)
+ if ((outPtr - toFill) > 32)
break;
- ThrowXML(UTFDataFormatException, XMLExcepts::Reader_BadUTF8Seq);
+
+ ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
}
else
{
+ //
+ // If we have enough room to store the leading and trailing
+ // chars, then lets do it. Else, pretend this one never
+ // happened, and leave it for the next time. Since we don't
+ // update the bytes read until the bottom of the loop, by
+ // breaking out here its like it never happened.
+ //
+ if (outPtr + 1 >= outEnd)
+ break;
+
// Store the leading surrogate char
tmpVal -= 0x10000;
- charSizes[charsRead] = trailingBytes + 1;
- toFill[charsRead++] = XMLCh((tmpVal >> 10) + 0xD800);
+ *sizePtr++ = trailingBytes + 1;
+ *outPtr++ = XMLCh((tmpVal >> 10) + 0xD800);
//
- // If we don't have room for the trailing one, then store
- // it in the spare char. Else store it in the buffer.
+ // And then the treailing char. This one accounts for no
+ // bytes eaten from the source, so set the char size for this
+ // one to be zero.
//
- if (charsRead >= maxChars)
- {
- fSpareCh = XMLCh(tmpVal & 0x3FF) + 0xDC00;
- }
- else
+ *sizePtr++ = 0;
+ *outPtr++ = XMLCh(tmpVal & 0x3FF) + 0xDC00;
+ }
+ }
+
+ // Update the bytes eaten
+ bytesEaten = srcPtr - srcData;
+
+ // Return the characters read
+ return outPtr - toFill;
+}
+
+
+unsigned int
+XMLUTF8Transcoder::transcodeTo( const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // Watch for pathological scenario. Shouldn't happen, but...
+ if (!srcCount || !maxBytes)
+ return 0;
+
+ //
+ // Get pointers to our start and end points of the input and output
+ // buffers.
+ //
+ const XMLCh* srcPtr = srcData;
+ const XMLCh* srcEnd = srcPtr + srcCount;
+ XMLByte* outPtr = toFill;
+ XMLByte* outEnd = toFill + maxBytes;
+
+ while (true)
+ {
+ //
+ // Tentatively get the next char out. We have to get it into a
+ // 32 bit value, because it could be a surrogate pair.
+ //
+ XMLUInt32 curVal = *srcPtr;
+
+ //
+ // If its a leading surrogate, then lets see if we have the trailing
+ // available. If not, then give up now and leave it for next time.
+ //
+ unsigned int srcUsed = 1;
+ if ((curVal >= 0xD800) && (curVal <= 0xDBFF))
+ {
+ if (srcPtr + 1 >= srcEnd)
+ break;
+
+ // Create the composite surrogate pair
+ curVal = ((curVal - 0xD800) << 10)
+ + ((*(srcPtr + 1) - 0xDC00) + 0x10000);
+
+ // And indicate that we ate another one
+ srcUsed++;
+ }
+
+ // Figure out how many bytes we need
+ unsigned int encodedBytes;
+ if (curVal < 0x80)
+ encodedBytes = 1;
+ else if (curVal < 0x800)
+ encodedBytes = 2;
+ else if (curVal < 0x10000)
+ encodedBytes = 3;
+ else if (curVal < 0x200000)
+ encodedBytes = 4;
+ else if (curVal < 0x4000000)
+ encodedBytes = 5;
+ else if (curVal <= 0x7FFFFFFF)
+ encodedBytes = 6;
+ else
+ {
+ // If the options say to throw, then throw
+ if (options == UnRep_Throw)
{
- // This one accounts for no bytes eaten
- charSizes[charsRead] = 0;
- toFill[charsRead++] = XMLCh(tmpVal & 0x3FF) + 0xDC00;
+ XMLCh tmpBuf[16];
+ XMLString::binToText(curVal, tmpBuf, 16, 16);
+ ThrowXML2
+ (
+ TranscodingException
+ , XMLExcepts::Trans_Unrepresentable
+ , tmpBuf
+ , getEncodingName()
+ );
}
+
+ // Else, use the replacement character
+ *outPtr++ = chSpace;
+ srcPtr += srcUsed;
+ continue;
}
- // Update the bytes eaten
- bytesEaten += trailingBytes + 1;
+ //
+ // If we cannot fully get this char into the output buffer,
+ // then leave it for the next time.
+ //
+ if (outPtr + encodedBytes > outEnd)
+ break;
+
+ // We can do it, so update the source index
+ srcPtr += srcUsed;
+
+ //
+ // And spit out the bytes. We spit them out in reverse order
+ // here, so bump up the output pointer and work down as we go.
+ //
+ outPtr += encodedBytes;
+ switch(encodedBytes)
+ {
+ case 6 : --*outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);
+ curVal >>= 6;
+ case 5 : --*outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);
+ curVal >>= 6;
+ case 4 : --*outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);
+ curVal >>= 6;
+ case 3 : --*outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);
+ curVal >>= 6;
+ case 2 : --*outPtr = XMLByte((curVal | 0x80UL) & 0xBFUL);
+ curVal >>= 6;
+ case 1 : --*outPtr = XMLByte
+ (
+ curVal | gFirstByteMark[encodedBytes]
+ );
+ }
+
+ // Add the encoded bytes back in again to indicate we've eaten them
+ outPtr += encodedBytes;
}
- // Return the characters read
- return charsRead;
+ // Fill in the chars we ate
+ charsEaten = (srcPtr - srcData);
+
+ // And return the bytes we filled in
+ return (outPtr - toFill);
+}
+
+
+bool XMLUTF8Transcoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ // We can represent anything in the Unicode (with surrogates) range
+ return (toCheck <= 0x10FFFF);
}
1.5 +16 -21 xml-xerces/c/src/util/XMLUTF8Transcoder.hpp
Index: XMLUTF8Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLUTF8Transcoder.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLUTF8Transcoder.hpp 2000/03/02 19:54:49 1.4
+++ XMLUTF8Transcoder.hpp 2000/03/17 23:59:55 1.5
@@ -86,16 +86,7 @@
// -----------------------------------------------------------------------
// Implementation of the XMLTranscoder interface
// -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
- (
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
+ virtual unsigned int transcodeFrom
(
const XMLByte* const srcData
, const unsigned int srcCount
@@ -105,24 +96,28 @@
, unsigned char* const charSizes
);
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
+
+
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XMLUTF8Transcoder(const XMLUTF8Transcoder&);
void operator=(const XMLUTF8Transcoder&);
-
-
- // -----------------------------------------------------------------------
- // Private data members
- //
- // fSpareCh
- // Sometimes, when we decode a surrogate pair, there isn't enough
- // space to store the second one. So we have to have somewhere to
- // put it until the next time.
- // -----------------------------------------------------------------------
- XMLCh fSpareCh;
};
#endif
1.3 +147 -432 xml-xerces/c/src/util/XMLWin1252Transcoder.cpp
Index: XMLWin1252Transcoder.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLWin1252Transcoder.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLWin1252Transcoder.cpp 2000/03/02 19:54:50 1.2
+++ XMLWin1252Transcoder.cpp 2000/03/17 23:59:55 1.3
@@ -58,65 +58,168 @@
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
-#include <util/BitOps.hpp>
#include <util/XMLWin1252Transcoder.hpp>
-#include <util/TranscodingException.hpp>
-#include <memory.h>
-
// ---------------------------------------------------------------------------
// Local const data
//
-// g1252XlatTable
-// This is the translation table for 1252 to Unicode. This table
-// contains 256 entries. The entry for x is the Unicode symbol for
-// 1252 code x.
-// ---------------------------------------------------------------------------
-static const XMLCh g1252XlatTable[256] =
+// gFromTable
+// This is the translation table for Windows 1252 to Unicode. This
+// table contains 255 entries. The entry for 1252 byte x is the
+// Unicode translation of that byte.
+//
+// gToTable
+// gToTableSz
+// This is the translation table for Unicode to Windows 1252. This one
+// contains a list of records, sorted by the Unicode code point. We do
+// a binary search to find the Unicode point, and that record's other
+// field is the 1252 code point to translate to.
+// ---------------------------------------------------------------------------
+static const XMLCh gFromTable[256] =
+{
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007
+ , 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
+ , 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017
+ , 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F
+ , 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027
+ , 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F
+ , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037
+ , 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F
+ , 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047
+ , 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F
+ , 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057
+ , 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F
+ , 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067
+ , 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F
+ , 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077
+ , 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F
+ , 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021
+ , 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F
+ , 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014
+ , 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178
+ , 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7
+ , 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF
+ , 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7
+ , 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF
+ , 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7
+ , 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF
+ , 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7
+ , 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF
+ , 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7
+ , 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF
+ , 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7
+ , 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+};
+
+static const XMLTransService::TransRec gToTable[] =
{
- 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007
- , 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F
- , 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017
- , 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F
- , 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027
- , 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F
- , 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037
- , 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F
- , 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047
- , 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F
- , 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057
- , 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F
- , 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067
- , 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F
- , 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077
- , 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F
- , 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021
- , 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F
- , 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014
- , 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178
- , 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7
- , 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF
- , 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7
- , 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF
- , 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7
- , 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF
- , 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7
- , 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF
- , 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7
- , 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF
- , 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7
- , 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
+ { 0x0000, 0x00 }, { 0x0001, 0x01 }, { 0x0002, 0x02 }, { 0x0003, 0x03 }
+ , { 0x0004, 0x04 }, { 0x0005, 0x05 }, { 0x0006, 0x06 }, { 0x0007, 0x07 }
+ , { 0x0008, 0x08 }, { 0x0009, 0x09 }, { 0x000A, 0x0A }, { 0x000B, 0x0B }
+ , { 0x000C, 0x0C }, { 0x000D, 0x0D }, { 0x000E, 0x0E }, { 0x000F, 0x0F }
+ , { 0x0010, 0x10 }, { 0x0011, 0x11 }, { 0x0012, 0x12 }, { 0x0013, 0x13 }
+ , { 0x0014, 0x14 }, { 0x0015, 0x15 }, { 0x0016, 0x16 }, { 0x0017, 0x17 }
+ , { 0x0018, 0x18 }, { 0x0019, 0x19 }, { 0x001A, 0x1A }, { 0x001B, 0x1B }
+ , { 0x001C, 0x1C }, { 0x001D, 0x1D }, { 0x001E, 0x1E }, { 0x001F, 0x1F }
+ , { 0x0020, 0x20 }, { 0x0021, 0x21 }, { 0x0022, 0x22 }, { 0x0023, 0x23 }
+ , { 0x0024, 0x24 }, { 0x0025, 0x25 }, { 0x0026, 0x26 }, { 0x0027, 0x27 }
+ , { 0x0028, 0x28 }, { 0x0029, 0x29 }, { 0x002A, 0x2A }, { 0x002B, 0x2B }
+ , { 0x002C, 0x2C }, { 0x002D, 0x2D }, { 0x002E, 0x2E }, { 0x002F, 0x2F }
+ , { 0x0030, 0x30 }, { 0x0031, 0x31 }, { 0x0032, 0x32 }, { 0x0033, 0x33 }
+ , { 0x0034, 0x34 }, { 0x0035, 0x35 }, { 0x0036, 0x36 }, { 0x0037, 0x37 }
+ , { 0x0038, 0x38 }, { 0x0039, 0x39 }, { 0x003A, 0x3A }, { 0x003B, 0x3B }
+ , { 0x003C, 0x3C }, { 0x003D, 0x3D }, { 0x003E, 0x3E }, { 0x003F, 0x3F }
+ , { 0x0040, 0x40 }, { 0x0041, 0x41 }, { 0x0042, 0x42 }, { 0x0043, 0x43 }
+ , { 0x0044, 0x44 }, { 0x0045, 0x45 }, { 0x0046, 0x46 }, { 0x0047, 0x47 }
+ , { 0x0048, 0x48 }, { 0x0049, 0x49 }, { 0x004A, 0x4A }, { 0x004B, 0x4B }
+ , { 0x004C, 0x4C }, { 0x004D, 0x4D }, { 0x004E, 0x4E }, { 0x004F, 0x4F }
+ , { 0x0050, 0x50 }, { 0x0051, 0x51 }, { 0x0052, 0x52 }, { 0x0053, 0x53 }
+ , { 0x0054, 0x54 }, { 0x0055, 0x55 }, { 0x0056, 0x56 }, { 0x0057, 0x57 }
+ , { 0x0058, 0x58 }, { 0x0059, 0x59 }, { 0x005A, 0x5A }, { 0x005B, 0x5B }
+ , { 0x005C, 0x5C }, { 0x005D, 0x5D }, { 0x005E, 0x5E }, { 0x005F, 0x5F }
+ , { 0x0060, 0x60 }, { 0x0061, 0x61 }, { 0x0062, 0x62 }, { 0x0063, 0x63 }
+ , { 0x0064, 0x64 }, { 0x0065, 0x65 }, { 0x0066, 0x66 }, { 0x0067, 0x67 }
+ , { 0x0068, 0x68 }, { 0x0069, 0x69 }, { 0x006A, 0x6A }, { 0x006B, 0x6B }
+ , { 0x006C, 0x6C }, { 0x006D, 0x6D }, { 0x006E, 0x6E }, { 0x006F, 0x6F }
+ , { 0x0070, 0x70 }, { 0x0071, 0x71 }, { 0x0072, 0x72 }, { 0x0073, 0x73 }
+ , { 0x0074, 0x74 }, { 0x0075, 0x75 }, { 0x0076, 0x76 }, { 0x0077, 0x77 }
+ , { 0x0078, 0x78 }, { 0x0079, 0x79 }, { 0x007A, 0x7A }, { 0x007B, 0x7B }
+ , { 0x007C, 0x7C }, { 0x007D, 0x7D }, { 0x007E, 0x7E }, { 0x007F, 0x7F }
+ , { 0x0081, 0x81 }, { 0x008D, 0x8D }, { 0x008F, 0x8F }, { 0x0090, 0x90 }
+ , { 0x009D, 0x9D }, { 0x00A0, 0xA0 }, { 0x00A1, 0xA1 }, { 0x00A2, 0xA2 }
+ , { 0x00A3, 0xA3 }, { 0x00A4, 0xA4 }, { 0x00A5, 0xA5 }, { 0x00A6, 0xA6 }
+ , { 0x00A7, 0xA7 }, { 0x00A8, 0xA8 }, { 0x00A9, 0xA9 }, { 0x00AA, 0xAA }
+ , { 0x00AB, 0xAB }, { 0x00AC, 0xAC }, { 0x00AD, 0xAD }, { 0x00AE, 0xAE }
+ , { 0x00AF, 0xAF }, { 0x00B0, 0xB0 }, { 0x00B1, 0xB1 }, { 0x00B2, 0xB2 }
+ , { 0x00B3, 0xB3 }, { 0x00B4, 0xB4 }, { 0x00B5, 0xB5 }, { 0x00B6, 0xB6 }
+ , { 0x00B7, 0xB7 }, { 0x00B8, 0xB8 }, { 0x00B9, 0xB9 }, { 0x00BA, 0xBA }
+ , { 0x00BB, 0xBB }, { 0x00BC, 0xBC }, { 0x00BD, 0xBD }, { 0x00BE, 0xBE }
+ , { 0x00BF, 0xBF }, { 0x00C0, 0xC0 }, { 0x00C1, 0xC1 }, { 0x00C2, 0xC2 }
+ , { 0x00C3, 0xC3 }, { 0x00C4, 0xC4 }, { 0x00C5, 0xC5 }, { 0x00C6, 0xC6 }
+ , { 0x00C7, 0xC7 }, { 0x00C8, 0xC8 }, { 0x00C9, 0xC9 }, { 0x00CA, 0xCA }
+ , { 0x00CB, 0xCB }, { 0x00CC, 0xCC }, { 0x00CD, 0xCD }, { 0x00CE, 0xCE }
+ , { 0x00CF, 0xCF }, { 0x00D0, 0xD0 }, { 0x00D1, 0xD1 }, { 0x00D2, 0xD2 }
+ , { 0x00D3, 0xD3 }, { 0x00D4, 0xD4 }, { 0x00D5, 0xD5 }, { 0x00D6, 0xD6 }
+ , { 0x00D7, 0xD7 }, { 0x00D8, 0xD8 }, { 0x00D9, 0xD9 }, { 0x00DA, 0xDA }
+ , { 0x00DB, 0xDB }, { 0x00DC, 0xDC }, { 0x00DD, 0xDD }, { 0x00DE, 0xDE }
+ , { 0x00DF, 0xDF }, { 0x00E0, 0xE0 }, { 0x00E1, 0xE1 }, { 0x00E2, 0xE2 }
+ , { 0x00E3, 0xE3 }, { 0x00E4, 0xE4 }, { 0x00E5, 0xE5 }, { 0x00E6, 0xE6 }
+ , { 0x00E7, 0xE7 }, { 0x00E8, 0xE8 }, { 0x00E9, 0xE9 }, { 0x00EA, 0xEA }
+ , { 0x00EB, 0xEB }, { 0x00EC, 0xEC }, { 0x00ED, 0xED }, { 0x00EE, 0xEE }
+ , { 0x00EF, 0xEF }, { 0x00F0, 0xF0 }, { 0x00F1, 0xF1 }, { 0x00F2, 0xF2 }
+ , { 0x00F3, 0xF3 }, { 0x00F4, 0xF4 }, { 0x00F5, 0xF5 }, { 0x00F6, 0xF6 }
+ , { 0x00F7, 0xF7 }, { 0x00F8, 0xF8 }, { 0x00F9, 0xF9 }, { 0x00FA, 0xFA }
+ , { 0x00FB, 0xFB }, { 0x00FC, 0xFC }, { 0x00FD, 0xFD }, { 0x00FE, 0xFE }
+ , { 0x00FF, 0xFF }, { 0x0152, 0x8C }, { 0x0153, 0x9C }, { 0x0160, 0x8A }
+ , { 0x0161, 0x9A }, { 0x0178, 0x9F }, { 0x017D, 0x8E }, { 0x017E, 0x9E }
+ , { 0x0192, 0x83 }, { 0x02C6, 0x88 }, { 0x02DC, 0x98 }, { 0x2013, 0x96 }
+ , { 0x2014, 0x97 }, { 0x2018, 0x91 }, { 0x2019, 0x92 }, { 0x201A, 0x82 }
+ , { 0x201C, 0x93 }, { 0x201D, 0x94 }, { 0x201E, 0x84 }, { 0x2020, 0x86 }
+ , { 0x2021, 0x87 }, { 0x2022, 0x95 }, { 0x2026, 0x85 }, { 0x2030, 0x89 }
+ , { 0x2039, 0x8B }, { 0x203A, 0x9B }, { 0x20AC, 0x80 }, { 0x2122, 0x99 }
+ , { 0xFF01, 0x21 }, { 0xFF02, 0x22 }, { 0xFF03, 0x23 }, { 0xFF04, 0x24 }
+ , { 0xFF05, 0x25 }, { 0xFF06, 0x26 }, { 0xFF07, 0x27 }, { 0xFF08, 0x28 }
+ , { 0xFF09, 0x29 }, { 0xFF0A, 0x2A }, { 0xFF0B, 0x2B }, { 0xFF0C, 0x2C }
+ , { 0xFF0D, 0x2D }, { 0xFF0E, 0x2E }, { 0xFF0F, 0x2F }, { 0xFF10, 0x30 }
+ , { 0xFF11, 0x31 }, { 0xFF12, 0x32 }, { 0xFF13, 0x33 }, { 0xFF14, 0x34 }
+ , { 0xFF15, 0x35 }, { 0xFF16, 0x36 }, { 0xFF17, 0x37 }, { 0xFF18, 0x38 }
+ , { 0xFF19, 0x39 }, { 0xFF1A, 0x3A }, { 0xFF1B, 0x3B }, { 0xFF1C, 0x3C }
+ , { 0xFF1D, 0x3D }, { 0xFF1E, 0x3E }, { 0xFF1F, 0x3F }, { 0xFF20, 0x40 }
+ , { 0xFF21, 0x41 }, { 0xFF22, 0x42 }, { 0xFF23, 0x43 }, { 0xFF24, 0x44 }
+ , { 0xFF25, 0x45 }, { 0xFF26, 0x46 }, { 0xFF27, 0x47 }, { 0xFF28, 0x48 }
+ , { 0xFF29, 0x49 }, { 0xFF2A, 0x4A }, { 0xFF2B, 0x4B }, { 0xFF2C, 0x4C }
+ , { 0xFF2D, 0x4D }, { 0xFF2E, 0x4E }, { 0xFF2F, 0x4F }, { 0xFF30, 0x50 }
+ , { 0xFF31, 0x51 }, { 0xFF32, 0x52 }, { 0xFF33, 0x53 }, { 0xFF34, 0x54 }
+ , { 0xFF35, 0x55 }, { 0xFF36, 0x56 }, { 0xFF37, 0x57 }, { 0xFF38, 0x58 }
+ , { 0xFF39, 0x59 }, { 0xFF3A, 0x5A }, { 0xFF3B, 0x5B }, { 0xFF3C, 0x5C }
+ , { 0xFF3D, 0x5D }, { 0xFF3E, 0x5E }, { 0xFF3F, 0x5F }, { 0xFF40, 0x60 }
+ , { 0xFF41, 0x61 }, { 0xFF42, 0x62 }, { 0xFF43, 0x63 }, { 0xFF44, 0x64 }
+ , { 0xFF45, 0x65 }, { 0xFF46, 0x66 }, { 0xFF47, 0x67 }, { 0xFF48, 0x68 }
+ , { 0xFF49, 0x69 }, { 0xFF4A, 0x6A }, { 0xFF4B, 0x6B }, { 0xFF4C, 0x6C }
+ , { 0xFF4D, 0x6D }, { 0xFF4E, 0x6E }, { 0xFF4F, 0x6F }, { 0xFF50, 0x70 }
+ , { 0xFF51, 0x71 }, { 0xFF52, 0x72 }, { 0xFF53, 0x73 }, { 0xFF54, 0x74 }
+ , { 0xFF55, 0x75 }, { 0xFF56, 0x76 }, { 0xFF57, 0x77 }, { 0xFF58, 0x78 }
+ , { 0xFF59, 0x79 }, { 0xFF5A, 0x7A }, { 0xFF5B, 0x7B }, { 0xFF5C, 0x7C }
+ , { 0xFF5D, 0x7D }, { 0xFF5E, 0x7E }
};
+static const unsigned int gToTableSz = 350;
// ---------------------------------------------------------------------------
-// XMLWin1252Transcoder: Constructors and Destructor
+// XML1140Transcoder: Constructors and Destructor
// ---------------------------------------------------------------------------
XMLWin1252Transcoder::XMLWin1252Transcoder( const XMLCh* const encodingName
, const unsigned int blockSize) :
- XMLTranscoder(encodingName, blockSize)
+ XML256TableTranscoder
+ (
+ encodingName
+ , blockSize
+ , gFromTable
+ , gToTable
+ , gToTableSz
+ )
{
}
@@ -125,391 +228,3 @@
{
}
-
-// ---------------------------------------------------------------------------
-// XMLWin1252Transcoder: Implementation of the transcoder API
-// ---------------------------------------------------------------------------
-bool XMLWin1252Transcoder::supportsSrcOfs() const
-{
- // Yes we support this
- return true;
-}
-
-
-XMLCh
-XMLWin1252Transcoder::transcodeOne( const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // If no source, give up
- if (!srcBytes)
- return 0;
-
- // We will eat one byte
- bytesEaten = 1;
-
- // And use the 0th byte as a look in our table
- return g1252XlatTable[*srcData];
-}
-
-
-unsigned int
-XMLWin1252Transcoder::transcodeXML( const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes)
-{
- // If debugging, make sure that the block size is legal
- #if defined(XERCES_DEBUG)
- checkBlockSize(maxChars);
- #endif
-
- //
- // Calculate the max chars we can do here. Its the lesser of the
- // max output chars and the number of chars in the source.
- //
- const unsigned int countToDo = srcCount < maxChars ? srcCount : maxChars;
-
- //
- // Loop through the count we have to do and map each char via the
- // lookup table.
- //
- const XMLByte* srcPtr = srcData;
- const XMLByte* endPtr = (srcPtr + countToDo);
- XMLCh* outPtr = toFill;
- while (srcPtr < endPtr)
- *outPtr++ = g1252XlatTable[*srcPtr++];
-
- // Set the bytes eaten
- bytesEaten = countToDo;
-
- // Set the character sizes to the fixed size
- memset(charSizes, 1, countToDo);
-
- // Return the chars we transcoded
- return countToDo;
-}
-
-
-
-#if 0
-struct XlatRecord
-{
- XMLCh xmlCh;
- XMLByte ebcdicCh;
-};
-
-static XlatRecord gXlatTable[256] =
-{
- { 0x0000, 0x00 }
- , { 0x0001, 0x01 }
- , { 0x0002, 0x02 }
- , { 0x0003, 0x03 }
- , { 0x0004, 0x04 }
- , { 0x0005, 0x05 }
- , { 0x0006, 0x06 }
- , { 0x0007, 0x07 }
- , { 0x0008, 0x08 }
- , { 0x0009, 0x09 }
- , { 0x000A, 0x0A }
- , { 0x000B, 0x0B }
- , { 0x000C, 0x0C }
- , { 0x000D, 0x0D }
- , { 0x000E, 0x0E }
- , { 0x000F, 0x0F }
- , { 0x0010, 0x10 }
- , { 0x0011, 0x11 }
- , { 0x0012, 0x12 }
- , { 0x0013, 0x13 }
- , { 0x0014, 0x14 }
- , { 0x0015, 0x15 }
- , { 0x0016, 0x16 }
- , { 0x0017, 0x17 }
- , { 0x0018, 0x18 }
- , { 0x0019, 0x19 }
- , { 0x001A, 0x1A }
- , { 0x001B, 0x1B }
- , { 0x001C, 0x1C }
- , { 0x001D, 0x1D }
- , { 0x001E, 0x1E }
- , { 0x001F, 0x1F }
- , { 0x0020, 0x20 }
- , { 0x0021, 0x21 }
- , { 0x0022, 0x22 }
- , { 0x0023, 0x23 }
- , { 0x0024, 0x24 }
- , { 0x0025, 0x25 }
- , { 0x0026, 0x26 }
- , { 0x0027, 0x27 }
- , { 0x0028, 0x28 }
- , { 0x0029, 0x29 }
- , { 0x002A, 0x2A }
- , { 0x002B, 0x2B }
- , { 0x002C, 0x2C }
- , { 0x002D, 0x2D }
- , { 0x002E, 0x2E }
- , { 0x002F, 0x2F }
- , { 0x0030, 0x30 }
- , { 0x0031, 0x31 }
- , { 0x0032, 0x32 }
- , { 0x0033, 0x33 }
- , { 0x0034, 0x34 }
- , { 0x0035, 0x35 }
- , { 0x0036, 0x36 }
- , { 0x0037, 0x37 }
- , { 0x0038, 0x38 }
- , { 0x0039, 0x39 }
- , { 0x003A, 0x3A }
- , { 0x003B, 0x3B }
- , { 0x003C, 0x3C }
- , { 0x003D, 0x3D }
- , { 0x003E, 0x3E }
- , { 0x003F, 0x3F }
- , { 0x0040, 0x40 }
- , { 0x0041, 0x41 }
- , { 0x0042, 0x42 }
- , { 0x0043, 0x43 }
- , { 0x0044, 0x44 }
- , { 0x0045, 0x45 }
- , { 0x0046, 0x46 }
- , { 0x0047, 0x47 }
- , { 0x0048, 0x48 }
- , { 0x0049, 0x49 }
- , { 0x004A, 0x4A }
- , { 0x004B, 0x4B }
- , { 0x004C, 0x4C }
- , { 0x004D, 0x4D }
- , { 0x004E, 0x4E }
- , { 0x004F, 0x4F }
- , { 0x0050, 0x50 }
- , { 0x0051, 0x51 }
- , { 0x0052, 0x52 }
- , { 0x0053, 0x53 }
- , { 0x0054, 0x54 }
- , { 0x0055, 0x55 }
- , { 0x0056, 0x56 }
- , { 0x0057, 0x57 }
- , { 0x0058, 0x58 }
- , { 0x0059, 0x59 }
- , { 0x005A, 0x5A }
- , { 0x005B, 0x5B }
- , { 0x005C, 0x5C }
- , { 0x005D, 0x5D }
- , { 0x005E, 0x5E }
- , { 0x005F, 0x5F }
- , { 0x0060, 0x60 }
- , { 0x0061, 0x61 }
- , { 0x0062, 0x62 }
- , { 0x0063, 0x63 }
- , { 0x0064, 0x64 }
- , { 0x0065, 0x65 }
- , { 0x0066, 0x66 }
- , { 0x0067, 0x67 }
- , { 0x0068, 0x68 }
- , { 0x0069, 0x69 }
- , { 0x006A, 0x6A }
- , { 0x006B, 0x6B }
- , { 0x006C, 0x6C }
- , { 0x006D, 0x6D }
- , { 0x006E, 0x6E }
- , { 0x006F, 0x6F }
- , { 0x0070, 0x70 }
- , { 0x0071, 0x71 }
- , { 0x0072, 0x72 }
- , { 0x0073, 0x73 }
- , { 0x0074, 0x74 }
- , { 0x0075, 0x75 }
- , { 0x0076, 0x76 }
- , { 0x0077, 0x77 }
- , { 0x0078, 0x78 }
- , { 0x0079, 0x79 }
- , { 0x007A, 0x7A }
- , { 0x007B, 0x7B }
- , { 0x007C, 0x7C }
- , { 0x007D, 0x7D }
- , { 0x007E, 0x7E }
- , { 0x007F, 0x7F }
- , { 0x0081, 0x81 }
- , { 0x008D, 0x8D }
- , { 0x008F, 0x8F }
- , { 0x0090, 0x90 }
- , { 0x009D, 0x9D }
- , { 0x00A0, 0xA0 }
- , { 0x00A1, 0xA1 }
- , { 0x00A2, 0xA2 }
- , { 0x00A3, 0xA3 }
- , { 0x00A4, 0xA4 }
- , { 0x00A5, 0xA5 }
- , { 0x00A6, 0xA6 }
- , { 0x00A7, 0xA7 }
- , { 0x00A8, 0xA8 }
- , { 0x00A9, 0xA9 }
- , { 0x00AA, 0xAA }
- , { 0x00AB, 0xAB }
- , { 0x00AC, 0xAC }
- , { 0x00AD, 0xAD }
- , { 0x00AE, 0xAE }
- , { 0x00AF, 0xAF }
- , { 0x00B0, 0xB0 }
- , { 0x00B1, 0xB1 }
- , { 0x00B2, 0xB2 }
- , { 0x00B3, 0xB3 }
- , { 0x00B4, 0xB4 }
- , { 0x00B5, 0xB5 }
- , { 0x00B6, 0xB6 }
- , { 0x00B7, 0xB7 }
- , { 0x00B8, 0xB8 }
- , { 0x00B9, 0xB9 }
- , { 0x00BA, 0xBA }
- , { 0x00BB, 0xBB }
- , { 0x00BC, 0xBC }
- , { 0x00BD, 0xBD }
- , { 0x00BE, 0xBE }
- , { 0x00BF, 0xBF }
- , { 0x00C0, 0xC0 }
- , { 0x00C1, 0xC1 }
- , { 0x00C2, 0xC2 }
- , { 0x00C3, 0xC3 }
- , { 0x00C4, 0xC4 }
- , { 0x00C5, 0xC5 }
- , { 0x00C6, 0xC6 }
- , { 0x00C7, 0xC7 }
- , { 0x00C8, 0xC8 }
- , { 0x00C9, 0xC9 }
- , { 0x00CA, 0xCA }
- , { 0x00CB, 0xCB }
- , { 0x00CC, 0xCC }
- , { 0x00CD, 0xCD }
- , { 0x00CE, 0xCE }
- , { 0x00CF, 0xCF }
- , { 0x00D0, 0xD0 }
- , { 0x00D1, 0xD1 }
- , { 0x00D2, 0xD2 }
- , { 0x00D3, 0xD3 }
- , { 0x00D4, 0xD4 }
- , { 0x00D5, 0xD5 }
- , { 0x00D6, 0xD6 }
- , { 0x00D7, 0xD7 }
- , { 0x00D8, 0xD8 }
- , { 0x00D9, 0xD9 }
- , { 0x00DA, 0xDA }
- , { 0x00DB, 0xDB }
- , { 0x00DC, 0xDC }
- , { 0x00DD, 0xDD }
- , { 0x00DE, 0xDE }
- , { 0x00DF, 0xDF }
- , { 0x00E0, 0xE0 }
- , { 0x00E1, 0xE1 }
- , { 0x00E2, 0xE2 }
- , { 0x00E3, 0xE3 }
- , { 0x00E4, 0xE4 }
- , { 0x00E5, 0xE5 }
- , { 0x00E6, 0xE6 }
- , { 0x00E7, 0xE7 }
- , { 0x00E8, 0xE8 }
- , { 0x00E9, 0xE9 }
- , { 0x00EA, 0xEA }
- , { 0x00EB, 0xEB }
- , { 0x00EC, 0xEC }
- , { 0x00ED, 0xED }
- , { 0x00EE, 0xEE }
- , { 0x00EF, 0xEF }
- , { 0x00F0, 0xF0 }
- , { 0x00F1, 0xF1 }
- , { 0x00F2, 0xF2 }
- , { 0x00F3, 0xF3 }
- , { 0x00F4, 0xF4 }
- , { 0x00F5, 0xF5 }
- , { 0x00F6, 0xF6 }
- , { 0x00F7, 0xF7 }
- , { 0x00F8, 0xF8 }
- , { 0x00F9, 0xF9 }
- , { 0x00FA, 0xFA }
- , { 0x00FB, 0xFB }
- , { 0x00FC, 0xFC }
- , { 0x00FD, 0xFD }
- , { 0x00FE, 0xFE }
- , { 0x00FF, 0xFF }
- , { 0x0152, 0x8C }
- , { 0x0153, 0x9C }
- , { 0x0160, 0x8A }
- , { 0x0161, 0x9A }
- , { 0x0178, 0x9F }
- , { 0x017D, 0x8E }
- , { 0x017E, 0x9E }
- , { 0x0192, 0x83 }
- , { 0x02C6, 0x88 }
- , { 0x02DC, 0x98 }
- , { 0x2013, 0x96 }
- , { 0x2014, 0x97 }
- , { 0x2018, 0x91 }
- , { 0x2019, 0x92 }
- , { 0x201A, 0x82 }
- , { 0x201C, 0x93 }
- , { 0x201D, 0x94 }
- , { 0x201E, 0x84 }
- , { 0x2020, 0x86 }
- , { 0x2021, 0x87 }
- , { 0x2022, 0x95 }
- , { 0x2026, 0x85 }
- , { 0x2030, 0x89 }
- , { 0x2039, 0x8B }
- , { 0x203A, 0x9B }
- , { 0x20AC, 0x80 }
- , { 0x2122, 0x99 }
-};
-
-#include <search.h>
-#include <stdio.h>
-int compFunc(const void* p1, const void* p2)
-{
- const XlatRecord* rec1 = (const XlatRecord*)p1;
- const XlatRecord* rec2 = (const XlatRecord*)p2;
-
- return (int)rec1->ebcdicCh - (int)rec2->ebcdicCh;
-}
-
-class SpitOutTable
-{
-public :
- SpitOutTable()
- {
- spitOutTable();
- }
-
- void spitOutTable()
- {
- qsort
- (
- gXlatTable
- , 256
- , sizeof(XlatRecord)
- , compFunc
- );
-
- unsigned int curValue = 0;
- for (unsigned int index = 0; index < 256; index++)
- {
- if (gXlatTable[index].ebcdicCh == curValue)
- {
- printf("0x%04X\n", (unsigned int)gXlatTable[index].xmlCh);
- curValue++;
- }
- else
- {
- // We've hit a gap, so catch up
- while (curValue < gXlatTable[index].ebcdicCh)
- {
- printf("0xFFFF\n");
- curValue++;
- }
- }
- }
- }
-};
-
-SpitOutTable kicker;
-
-#endif
1.3 +3 -25 xml-xerces/c/src/util/XMLWin1252Transcoder.hpp
Index: XMLWin1252Transcoder.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLWin1252Transcoder.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLWin1252Transcoder.hpp 2000/03/02 19:54:50 1.2
+++ XMLWin1252Transcoder.hpp 2000/03/17 23:59:55 1.3
@@ -58,7 +58,7 @@
#define XMLWIN2152TRANSCODER_HPP
#include <util/XercesDefs.hpp>
-#include <util/TransService.hpp>
+#include <util/XML256TableTranscoder.hpp>
//
@@ -66,7 +66,7 @@
// for the Windows variant of Latin1, called Windows-1252. Its close to
// Latin1, but is somewhat different.
//
-class XMLUTIL_EXPORT XMLWin1252Transcoder : public XMLTranscoder
+class XMLUTIL_EXPORT XMLWin1252Transcoder : public XML256TableTranscoder
{
public :
// -----------------------------------------------------------------------
@@ -81,33 +81,11 @@
virtual ~XMLWin1252Transcoder();
- // -----------------------------------------------------------------------
- // Implementation of the XMLTranscoder interface
- // -----------------------------------------------------------------------
- virtual bool supportsSrcOfs() const;
-
- virtual XMLCh transcodeOne
- (
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
- const XMLByte* const srcData
- , const unsigned int srcCount
- , XMLCh* const toFill
- , const unsigned int maxChars
- , unsigned int& bytesEaten
- , unsigned char* const charSizes
- );
-
-
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
+ XMLWin1252Transcoder();
XMLWin1252Transcoder(const XMLWin1252Transcoder&);
void operator=(const XMLWin1252Transcoder&);
};
1.8 +12 -6 xml-xerces/c/src/util/MsgLoaders/InMemory/CppErrMsgs_EN_US.hpp
Index: CppErrMsgs_EN_US.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/MsgLoaders/InMemory/CppErrMsgs_EN_US.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CppErrMsgs_EN_US.hpp 2000/02/14 19:30:01 1.7
+++ CppErrMsgs_EN_US.hpp 2000/03/17 23:59:58 1.8
@@ -191,6 +191,8 @@
, { 0x0054,0x0068,0x0065,0x0020,0x0075,0x006E,0x0061,0x0072,0x0079,0x0020,0x006F,0x0070,0x0065,0x0072,0x0061,0x0074,0x0069,0x006F,0x006E,0x0020,0x006E,0x006F,0x0064,0x0065,0x0020,0x0068,0x0061,0x0064,0x0020,0x0061,0x0020,0x0062,0x0069,0x006E,0x0061,0x0072,0x0079,0x0020,0x006E,0x006F,0x0064,0x0065,0x0020,0x0074,0x0079,0x0070,0x0065,0x00 }
, { 0x0055,0x006E,0x006B,0x006E,0x006F,0x0077,0x006E,0x0020,0x0063,0x006F,0x006E,0x0074,0x0065,0x006E,0x0074,0x0020,0x006D,0x006F,0x0064,0x0065,0x006C,0x0020,0x0074,0x0079,0x0070,0x0065,0x00 }
, { 0x0055,0x006E,0x006B,0x006E,0x006F,0x0077,0x006E,0x0020,0x0063,0x006F,0x006E,0x0074,0x0065,0x006E,0x0074,0x0020,0x0073,0x0070,0x0065,0x0063,0x0020,0x0074,0x0079,0x0070,0x0065,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0070,0x0061,0x0072,0x0065,0x006E,0x0074,0x0020,0x0065,0x006C,0x0065,0x006D,0x0065,0x006E,0x0074,0x0020,0x0068,0x0061,0x0073,0x0020,0x006E,0x006F,0x0020,0x0063,0x006F,0x006E,0x0074,0x0065,0x006E,0x0074,0x0020,0x0073,0x0070,0x0065,0x0063,0x0020,0x006E,0x006F,0x0064,0x0065,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0063,0x0072,0x0065,0x0061,0x0074,0x0069,0x006F,0x006E,0x0020,0x0072,0x0065,0x0061,0x0073,0x006F,0x006E,0x0020,0x0065,0x006E,0x0075,0x006D,0x0020,0x0068,0x0061,0x0073,0x0020,0x0061,0x006E,0x0020,0x0075,0x006E,0x006B,0x006E,0x006F,0x0077,0x006E,0x0020,0x0076,0x0061,0x006C,0x0075,0x0065,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0065,0x006C,0x0065,0x006D,0x0065,0x006E,0x0074,0x0020,0x0073,0x0074,0x0061,0x0063,0x006B,0x0020,0x0069,0x0073,0x0020,0x0065,0x006D,0x0070,0x0074,0x0079,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0065,0x006C,0x0065,0x006D,0x0065,0x006E,0x0074,0x0020,0x0073,0x0074,0x0061,0x0063,0x006B,0x0020,0x0069,0x006E,0x0064,0x0065,0x0078,0x0020,0x0067,0x0069,0x0076,0x0065,0x006E,0x0020,0x0077,0x0061,0x0073,0x0020,0x0062,0x0065,0x0079,0x006F,0x006E,0x0064,0x0020,0x0074,0x0068,0x0065,0x0020,0x0073,0x0074,0x0061,0x0063,0x006B,0x0020,0x0074,0x006F,0x0070,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0065,0x006C,0x0065,0x006D,0x0065,0x006E,0x0074,0x0020,0x0073,0x0074,0x0061,0x0063,0x006B,0x0020,0x0077,0x0061,0x0073,0x0020,0x0061,0x006C,0x0072,0x0065,0x0061,0x0064,0x0079,0x0020,0x0065,0x006D,0x0070,0x0074,0x0079,0x0020,0x0077,0x0068,0x0065,0x006E,0x0020,0x0061,0x0020,0x0070,0x006F,0x0070,0x0020,0x0072,0x0065,0x0071,0x0075,0x0065,0x0073,0x0074,0x0020,0x006F,0x0063,0x0063,0x0075,0x0072,0x0065,0x0064,0x00 }
@@ -206,6 +208,7 @@
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0072,0x0065,0x0073,0x0065,0x0074,0x0020,0x0066,0x0069,0x006C,0x0065,0x0020,0x0074,0x006F,0x0020,0x0062,0x0065,0x0067,0x0069,0x006E,0x006E,0x0069,0x006E,0x0067,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0061,0x0063,0x0065,0x0072,0x0074,0x0061,0x0069,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x0066,0x0069,0x006C,0x0065,0x0020,0x0073,0x0069,0x007A,0x0065,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0064,0x0065,0x0074,0x0065,0x0072,0x006D,0x0069,0x006E,0x0065,0x0020,0x0062,0x0061,0x0073,0x0065,0x0020,0x0070,0x0061,0x0074,0x0068,0x006E,0x0061,0x006D,0x0065,0x0020,0x006F,0x0066,0x0020,0x0074,0x0068,0x0065,0x0020,0x0066,0x0069,0x006C,0x0065,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0062,0x0061,0x0073,0x0065,0x0020,0x0070,0x0061,0x0074,0x0068,0x0020,0x0068,0x0061,0x0064,0x0020,0x0074,0x006F,0x006F,0x0020,0x0066,0x0065,0x0077,0x0020,0x006C,0x0065,0x0076,0x0065,0x006C,0x0073,0x0020,0x0074,0x006F,0x0020,0x0077,0x0065,0x0061,0x0076,0x0065,0x0020,0x0069,0x006E,0x0020,0x0072,0x0065,0x006C,0x0061,0x0074,0x0069,0x0076,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x00 }
, { 0x0050,0x0061,0x0072,0x0073,0x0065,0x0020,0x006D,0x0061,0x0079,0x0020,0x006E,0x006F,0x0074,0x0020,0x0062,0x0065,0x0020,0x0063,0x0061,0x006C,0x006C,0x0065,0x0064,0x0020,0x0077,0x0068,0x0069,0x006C,0x0065,0x0020,0x0070,0x0061,0x0072,0x0073,0x0069,0x006E,0x0067,0x00 }
, { 0x0041,0x0020,0x0044,0x004F,0x0043,0x0054,0x0059,0x0050,0x0045,0x0020,0x0077,0x0061,0x0073,0x0020,0x0073,0x0065,0x0065,0x006E,0x0020,0x0062,0x0075,0x0074,0x0020,0x0074,0x0068,0x0065,0x0020,0x0069,0x006E,0x0073,0x0074,0x0061,0x006C,0x006C,0x0065,0x0064,0x0020,0x0076,0x0061,0x006C,0x0069,0x0064,0x0061,0x0074,0x006F,0x0072,0x0020,0x0064,0x006F,0x0065,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0075,0x006E,0x0064,0x0065,0x0072,0x0073,0x0074,0x0061,0x006E,0x0064,0x0020,0x0044,0x0054,0x0044,0x0073,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x006F,0x0070,0x0065,0x006E,0x0020,0x0044,0x0054,0x0044,0x0020,0x0066,0x0069,0x006C,0x0065,0x0020,0x0027,0x007B,0x0030,0x007D,0x0027,0x00 }
@@ -229,8 +232,6 @@
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0063,0x0072,0x0065,0x0061,0x0074,0x0065,0x0020,0x0061,0x0020,0x0063,0x006F,0x006E,0x0076,0x0065,0x0072,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0072,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x003A,0x0020,0x007B,0x0030,0x007D,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0064,0x0065,0x0063,0x006F,0x0064,0x0065,0x0020,0x0066,0x0069,0x0072,0x0073,0x0074,0x0020,0x006C,0x0069,0x006E,0x0065,0x0020,0x006F,0x0066,0x0020,0x0065,0x006E,0x0074,0x0069,0x0074,0x0079,0x003A,0x0020,0x007B,0x0030,0x007D,0x00 }
, { 0x0045,0x006E,0x0064,0x0020,0x006F,0x0066,0x0020,0x0069,0x006E,0x0070,0x0075,0x0074,0x0020,0x0077,0x0061,0x0073,0x0020,0x0068,0x0069,0x0074,0x0020,0x0069,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x006D,0x0069,0x0064,0x0064,0x006C,0x0065,0x0020,0x006F,0x0066,0x0020,0x0061,0x0020,0x006D,0x0075,0x006C,0x0074,0x0069,0x0062,0x0079,0x0074,0x0065,0x0020,0x0073,0x0065,0x0071,0x0075,0x0065,0x006E,0x0063,0x0065,0x00 }
- , { 0x0049,0x006E,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x0073,0x0065,0x0063,0x006F,0x006E,0x0064,0x0020,0x0062,0x0079,0x0074,0x0065,0x0020,0x006F,0x0066,0x0020,0x0061,0x0020,0x0055,0x0054,0x0046,0x002D,0x0038,0x0020,0x0063,0x0068,0x0061,0x0072,0x0061,0x0063,0x0074,0x0065,0x0072,0x0020,0x0073,0x0065,0x0071,0x0075,0x0065,0x006E,0x0063,0x0065,0x00 }
- , { 0x0049,0x006E,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x0073,0x0075,0x0072,0x0072,0x006F,0x0067,0x0061,0x0074,0x0065,0x0020,0x0063,0x0068,0x0061,0x0072,0x0061,0x0063,0x0074,0x0065,0x0072,0x0020,0x0066,0x006F,0x0075,0x006E,0x0064,0x0020,0x0069,0x006E,0x0020,0x0055,0x0054,0x0046,0x002D,0x0038,0x0020,0x0064,0x0061,0x0074,0x0061,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0063,0x0075,0x0072,0x0072,0x0065,0x006E,0x0074,0x0020,0x0074,0x0072,0x0061,0x006E,0x0073,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x0073,0x0065,0x0072,0x0076,0x0069,0x0063,0x0065,0x0020,0x0064,0x006F,0x0065,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0073,0x0075,0x0070,0x0070,0x006F,0x0072,0x0074,0x0020,0x0073,0x006F,0x0075,0x0072,0x0063,0x0065,0x0020,0x006F,0x0066,0x0066,0x0073,0x0065,0x0074,0x0020,0x0069,0x006E,0x0066,0x006F,0x0072,0x006D,0x0061,0x0074,0x0069,0x006F,0x006E,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0020,0x0066,0x0069,0x006C,0x0065,0x0073,0x0020,0x006D,0x0075,0x0073,0x0074,0x0020,0x0070,0x0072,0x006F,0x0076,0x0069,0x0064,0x0065,0x0020,0x0061,0x006E,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x003D,0x0020,0x0073,0x0074,0x0072,0x0069,0x006E,0x0067,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0070,0x0072,0x0069,0x006D,0x0061,0x0072,0x0079,0x0020,0x0064,0x006F,0x0063,0x0075,0x006D,0x0065,0x006E,0x0074,0x0020,0x0065,0x006E,0x0074,0x0069,0x0074,0x0079,0x0020,0x0063,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0062,0x0065,0x0020,0x006F,0x0070,0x0065,0x006E,0x0065,0x0064,0x002E,0x0020,0x0049,0x0064,0x003D,0x007B,0x0030,0x007D,0x00 }
@@ -246,11 +247,14 @@
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0077,0x0072,0x0069,0x0074,0x0065,0x0020,0x0074,0x006F,0x0020,0x0073,0x0074,0x0061,0x006E,0x0064,0x0061,0x0072,0x0064,0x0020,0x006F,0x0075,0x0074,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0077,0x0072,0x0069,0x0074,0x0065,0x0020,0x0074,0x006F,0x0020,0x0063,0x006F,0x006E,0x0073,0x006F,0x006C,0x0065,0x00 }
, { 0x0053,0x0074,0x0072,0x0069,0x006E,0x0067,0x0020,0x0070,0x006F,0x006F,0x006C,0x0020,0x0069,0x0064,0x0020,0x0077,0x0061,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x006C,0x0065,0x0067,0x0061,0x006C,0x00 }
- , { 0x0054,0x0068,0x0065,0x0020,0x0062,0x006C,0x006F,0x0063,0x006B,0x0020,0x006F,0x0066,0x0020,0x0058,0x004D,0x004C,0x0020,0x0064,0x0061,0x0074,0x0061,0x0020,0x0063,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0062,0x0065,0x0020,0x0074,0x0072,0x0061,0x006E,0x0073,0x0063,0x006F,0x0064,0x0065,0x0064,0x00 }
, { 0x0043,0x006F,0x0075,0x006C,0x0064,0x0020,0x006E,0x006F,0x0074,0x0020,0x0063,0x0072,0x0065,0x0061,0x0074,0x0065,0x0020,0x0061,0x0020,0x0064,0x0065,0x0066,0x0061,0x0075,0x006C,0x0074,0x0020,0x0074,0x0072,0x0061,0x006E,0x0073,0x0063,0x006F,0x0064,0x0065,0x0072,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x006D,0x0061,0x0078,0x0069,0x006D,0x0075,0x006D,0x0020,0x0073,0x0069,0x007A,0x0065,0x0020,0x0074,0x006F,0x0020,0x0078,0x006C,0x0061,0x0074,0x0020,0x0069,0x0073,0x0020,0x006C,0x0061,0x0072,0x0067,0x0065,0x0072,0x0020,0x0074,0x0068,0x0061,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x0064,0x0065,0x0063,0x006C,0x0061,0x0072,0x0065,0x0064,0x0020,0x0062,0x006C,0x006F,0x0063,0x006B,0x0020,0x0073,0x0069,0x007A,0x0065,0x00 }
- , { 0x0047,0x006F,0x0074,0x0020,0x0061,0x006E,0x0020,0x0072,0x0065,0x0070,0x0072,0x0065,0x0073,0x0065,0x006E,0x0074,0x0061,0x0062,0x006C,0x0065,0x0020,0x0063,0x006F,0x0064,0x0065,0x0020,0x0070,0x006F,0x0069,0x006E,0x0074,0x0020,0x0066,0x006F,0x0072,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x007B,0x0030,0x007D,0x00 }
- , { 0x0041,0x0020,0x0073,0x006F,0x0075,0x0072,0x0063,0x0065,0x0020,0x0063,0x0068,0x0061,0x0072,0x0061,0x0063,0x0074,0x0065,0x0072,0x0020,0x0077,0x0061,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0069,0x006E,0x0020,0x0074,0x0068,0x0065,0x0020,0x0063,0x006F,0x0064,0x0065,0x0020,0x0070,0x006F,0x0069,0x006E,0x0074,0x0020,0x0073,0x0065,0x0074,0x0020,0x0066,0x006F,0x0072,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x007B,0x0030,0x007D,0x00 }
+ , { 0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0020,0x0063,0x0068,0x0061,0x0072,0x0020,0x007B,0x0030,0x007D,0x0020,0x0069,0x0073,0x0020,0x0072,0x0065,0x0070,0x0072,0x0065,0x0073,0x0065,0x006E,0x0074,0x0061,0x0062,0x006C,0x0065,0x0020,0x0069,0x006E,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x007B,0x0031,0x007D,0x00 }
+ , { 0x0043,0x0068,0x0061,0x0072,0x0061,0x0063,0x0074,0x0065,0x0072,0x0020,0x007B,0x0030,0x007D,0x0020,0x0069,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x0066,0x006F,0x0072,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x007B,0x0031,0x007D,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0072,0x0065,0x0071,0x0075,0x0065,0x0073,0x0074,0x0065,0x0064,0x0020,0x0062,0x006C,0x006F,0x0063,0x006B,0x0020,0x0073,0x0069,0x007A,0x0065,0x0020,0x0069,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0065,0x0071,0x0075,0x0061,0x006C,0x0020,0x0074,0x006F,0x0020,0x0074,0x0068,0x0065,0x0020,0x0073,0x0069,0x007A,0x0065,0x0020,0x0073,0x0065,0x0074,0x0020,0x0064,0x0075,0x0072,0x0069,0x006E,0x0067,0x0020,0x0063,0x006F,0x006E,0x0073,0x0074,0x0072,0x0075,0x0063,0x0074,0x0069,0x006F,0x006E,0x00 }
+ , { 0x0041,0x006E,0x0020,0x0069,0x006E,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x006D,0x0075,0x006C,0x0074,0x0069,0x002D,0x0062,0x0079,0x0074,0x0065,0x0020,0x0073,0x006F,0x0075,0x0072,0x0063,0x0065,0x0020,0x0074,0x0065,0x0078,0x0074,0x0020,0x0073,0x0065,0x0071,0x0075,0x0065,0x006E,0x0063,0x0065,0x0020,0x0077,0x0061,0x0073,0x0020,0x0065,0x006E,0x0063,0x006F,0x0075,0x006E,0x0074,0x0065,0x0072,0x0065,0x0064,0x00 }
+ , { 0x007B,0x0030,0x007D,0x0020,0x0069,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0061,0x0020,0x0076,0x0061,0x006C,0x0069,0x0064,0x0020,0x0076,0x0061,0x006C,0x0075,0x0065,0x0020,0x0066,0x006F,0x0072,0x0020,0x0065,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x0020,0x007B,0x0031,0x007D,0x00 }
+ , { 0x004C,0x0065,0x0061,0x0064,0x0069,0x006E,0x0067,0x0020,0x0073,0x0075,0x0072,0x0072,0x006F,0x0067,0x0061,0x0074,0x0065,0x0020,0x0077,0x0061,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0066,0x006F,0x006C,0x006C,0x006F,0x0077,0x0065,0x0064,0x0020,0x0062,0x0079,0x0020,0x0074,0x0072,0x0061,0x0069,0x006C,0x0069,0x006E,0x0067,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0055,0x0052,0x004C,0x0020,0x0077,0x0061,0x0073,0x0020,0x006E,0x006F,0x0074,0x0020,0x0063,0x006F,0x0072,0x0072,0x0065,0x0063,0x0074,0x006C,0x0079,0x0020,0x0066,0x006F,0x0072,0x006D,0x0065,0x0064,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0055,0x0052,0x004C,0x0020,0x0075,0x0073,0x0065,0x0064,0x0020,0x0061,0x006E,0x0020,0x0075,0x006E,0x0073,0x0075,0x0070,0x0070,0x006F,0x0072,0x0074,0x0065,0x0064,0x0020,0x0070,0x0072,0x006F,0x0074,0x006F,0x0063,0x006F,0x006C,0x00 }
, { 0x0055,0x006E,0x0073,0x0075,0x0070,0x0070,0x006F,0x0072,0x0074,0x0065,0x0064,0x0020,0x0055,0x0052,0x004C,0x0020,0x0070,0x0072,0x006F,0x0074,0x006F,0x0063,0x006F,0x006C,0x003A,0x0020,0x0027,0x007B,0x0030,0x007D,0x0027,0x00 }
@@ -259,6 +263,8 @@
, { 0x0045,0x0078,0x0070,0x0065,0x0063,0x0074,0x0065,0x0064,0x0020,0x002F,0x002F,0x0020,0x0061,0x0066,0x0074,0x0065,0x0072,0x0020,0x0070,0x0072,0x006F,0x0074,0x006F,0x0063,0x006F,0x006C,0x00 }
, { 0x0025,0x0020,0x006D,0x0075,0x0073,0x0074,0x0020,0x0062,0x0065,0x0020,0x0066,0x006F,0x006C,0x006C,0x006F,0x0077,0x0065,0x0064,0x0020,0x0062,0x0079,0x0020,0x0074,0x0077,0x006F,0x0020,0x0068,0x0065,0x0078,0x0020,0x0064,0x0069,0x0067,0x0069,0x0074,0x0073,0x00 }
, { 0x0055,0x006E,0x0074,0x0065,0x0072,0x006D,0x0069,0x006E,0x0061,0x0074,0x0065,0x0064,0x0020,0x0068,0x006F,0x0073,0x0074,0x0020,0x0063,0x006F,0x006D,0x0070,0x006F,0x006E,0x0065,0x006E,0x0074,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0062,0x0061,0x0073,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x0020,0x006F,0x0066,0x0020,0x0074,0x0068,0x0065,0x0020,0x0055,0x0052,0x004C,0x0020,0x0063,0x0061,0x006E,0x006E,0x006F,0x0074,0x0020,0x0062,0x0065,0x0020,0x0072,0x0065,0x006C,0x0061,0x0074,0x0069,0x0076,0x0065,0x00 }
+ , { 0x0054,0x0068,0x0065,0x0020,0x0062,0x0061,0x0073,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x0020,0x0068,0x0061,0x0073,0x0020,0x0074,0x006F,0x006F,0x0020,0x0066,0x0065,0x0077,0x0020,0x006C,0x0065,0x0076,0x0065,0x006C,0x0073,0x0020,0x0074,0x006F,0x0020,0x0077,0x0065,0x0061,0x0076,0x0065,0x0020,0x0069,0x006E,0x0020,0x0072,0x0065,0x006C,0x0061,0x0074,0x0069,0x0076,0x0065,0x0020,0x0070,0x0061,0x0072,0x0074,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0070,0x0061,0x0073,0x0073,0x0065,0x0064,0x0020,0x0069,0x006E,0x0064,0x0065,0x0078,0x0020,0x0069,0x0073,0x0020,0x0070,0x0061,0x0073,0x0074,0x0020,0x0074,0x0068,0x0065,0x0020,0x0065,0x006E,0x0064,0x0020,0x006F,0x0066,0x0020,0x0074,0x0068,0x0065,0x0020,0x0076,0x0065,0x0063,0x0074,0x006F,0x0072,0x00 }
, { 0x0054,0x0068,0x0065,0x0020,0x0065,0x006C,0x0065,0x006D,0x0065,0x006E,0x0074,0x0020,0x0069,0x0064,0x0020,0x0077,0x0061,0x0073,0x0020,0x0069,0x006E,0x0076,0x0061,0x006C,0x0069,0x0064,0x00 }
, { 0x0057,0x0068,0x0065,0x006E,0x0020,0x0072,0x0065,0x0075,0x0073,0x0069,0x006E,0x0067,0x0020,0x0074,0x0068,0x0065,0x0020,0x0076,0x0061,0x006C,0x0069,0x0064,0x0061,0x0074,0x006F,0x0072,0x002C,0x0020,0x006E,0x006F,0x0020,0x0069,0x006E,0x0074,0x0065,0x0072,0x006E,0x0061,0x006C,0x0020,0x0073,0x0075,0x0062,0x0073,0x0065,0x0074,0x0020,0x0069,0x0073,0x0020,0x0061,0x006C,0x006C,0x006F,0x0077,0x0065,0x0064,0x00 }
@@ -266,5 +272,5 @@
, { 0x0045,0x005F,0x0045,0x006E,0x0064,0x00 }
};
-const unsigned int gXMLExceptArraySize = 95;
+const unsigned int gXMLExceptArraySize = 101;
1.10 +76 -70 xml-xerces/c/src/util/MsgLoaders/MsgCatalog/XMLMsgCat_EN_US.Msg
Index: XMLMsgCat_EN_US.Msg
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/MsgLoaders/MsgCatalog/XMLMsgCat_EN_US.Msg,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- XMLMsgCat_EN_US.Msg 2000/02/14 19:30:01 1.9
+++ XMLMsgCat_EN_US.Msg 2000/03/17 23:59:58 1.10
@@ -173,77 +173,83 @@
15 The unary operation node had a binary node type
16 Unknown content model type
17 Unknown content spec type
- 18 The element stack is empty
- 19 The element stack index given was beyond the stack top
- 20 The element stack was already empty when a pop request occured
- 21 A parent operation was requested, but only one element is on the stack
- 22 The enumerator contains no more elements
- 23 Could not open file: {0}
- 24 Could not query the current file position
- 25 Could not close the file
- 26 Could not seek to end of file
- 27 Could not seek to required position in file
- 28 Could not duplicate the handle
- 29 Could not read data from file
- 30 Could not reset file to beginning
- 31 Could not acertain the file size
- 32 Could not determine base pathname of the file
- 33 Parse may not be called while parsing
- 34 A DOCTYPE was seen but the installed validator does not understand DTDs
- 35 Could not open DTD file '{0}'
- 36 Could not open external entity '{0}'
- 37 The end of input was not expected
- 38 The hash modulus cannot be zero
- 39 Hashing the key returned an invalid bad hash value
- 40 The key '{0}' could not be found in the hash table
- 41 Could not create mutex
- 42 Could not close mutex
- 43 Could not lock mutex
- 44 Could not unlock mutex
- 45 Could not destroy mutex
- 46 Error on {0} NetAccessor. Msg: {1}
- 47 The element {0} already exists
- 48 Hashing the key returned an invalid bad hash value
- 49 The passed id is not valid for this pool
- 50 The modulus value cannot be zero
- 51 The indicated reader id was never found
- 52 The auto encoding enum has an unknown value
- 53 Could not create a converter for encoding: {0}
- 54 Could not decode first line of entity: {0}
- 55 End of input was hit in the middle of a multibyte sequence
- 56 Invalid second byte of a UTF-8 character sequence
- 57 Invalid surrogate character found in UTF-8 data
- 58 The current transcoding service does not support source offset information
- 59 EBCDIC files must provide an encoding= string
- 60 The primary document entity could not be opened. Id={0}
- 61 Unbalanced start/end tags found, cannot continue
- 62 The call to scanNext() is illegal at this time
- 63 The index is past the top of stack
- 64 The stack is empty, cannot access members
- 65 The target buffer cannot have a max size of zero
- 66 The given radix is not supported. Use 2, 8, 10, or 16
- 67 The target buffer is too small to accept the results
- 68 The start index is past the end of the string
- 69 Could not write to standard err
- 70 Could not write to standard out
- 71 Could not write to console
- 72 String pool id was not legal
- 73 The block of XML data could not be transcoded
+ 18 The parent element has no content spec node
+ 19 The creation reason enum has an unknown value
+ 20 The element stack is empty
+ 21 The element stack index given was beyond the stack top
+ 22 The element stack was already empty when a pop request occured
+ 23 A parent operation was requested, but only one element is on the stack
+ 24 The enumerator contains no more elements
+ 25 Could not open file: {0}
+ 26 Could not query the current file position
+ 27 Could not close the file
+ 28 Could not seek to end of file
+ 29 Could not seek to required position in file
+ 30 Could not duplicate the handle
+ 31 Could not read data from file
+ 32 Could not reset file to beginning
+ 33 Could not acertain the file size
+ 34 Could not determine base pathname of the file
+ 35 The base path had too few levels to weave in relative part
+ 36 Parse may not be called while parsing
+ 37 A DOCTYPE was seen but the installed validator does not understand DTDs
+ 38 Could not open DTD file '{0}'
+ 39 Could not open external entity '{0}'
+ 40 The end of input was not expected
+ 41 The hash modulus cannot be zero
+ 42 Hashing the key returned an invalid bad hash value
+ 43 The key '{0}' could not be found in the hash table
+ 44 Could not create mutex
+ 45 Could not close mutex
+ 46 Could not lock mutex
+ 47 Could not unlock mutex
+ 48 Could not destroy mutex
+ 49 Error on {0} NetAccessor. Msg: {1}
+ 50 The element {0} already exists
+ 51 Hashing the key returned an invalid bad hash value
+ 52 The passed id is not valid for this pool
+ 53 The modulus value cannot be zero
+ 54 The indicated reader id was never found
+ 55 The auto encoding enum has an unknown value
+ 56 Could not create a converter for encoding: {0}
+ 57 Could not decode first line of entity: {0}
+ 58 End of input was hit in the middle of a multibyte sequence
+ 59 The current transcoding service does not support source offset information
+ 60 EBCDIC files must provide an encoding= string
+ 61 The primary document entity could not be opened. Id={0}
+ 62 Unbalanced start/end tags found, cannot continue
+ 63 The call to scanNext() is illegal at this time
+ 64 The index is past the top of stack
+ 65 The stack is empty, cannot access members
+ 66 The target buffer cannot have a max size of zero
+ 67 The given radix is not supported. Use 2, 8, 10, or 16
+ 68 The target buffer is too small to accept the results
+ 69 The start index is past the end of the string
+ 70 Could not write to standard err
+ 71 Could not write to standard out
+ 72 Could not write to console
+ 73 String pool id was not legal
74 Could not create a default transcoder
75 The maximum size to xlat is larger than the declared block size
- 76 Got an representable code point for encoding {0}
- 77 A source character was not in the code point set for encoding {0}
- 78 The URL was not correctly formed
- 79 The URL used an unsupported protocol
- 80 Unsupported URL protocol: '{0}'
- 81 Only localhost is supported at this time
- 82 No protocol prefix present
- 83 Expected // after protocol
- 84 % must be followed by two hex digits
- 85 Unterminated host component
- 86 The passed index is past the end of the vector
- 87 The element id was invalid
- 88 When reusing the validator, no internal subset is allowed
- 89 The passed recognizer encoding was not known
+ 76 Unicode char {0} is representable in encoding {1}
+ 77 Character {0} is not valid for encoding {1}
+ 78 The requested block size is not equal to the size set during construction
+ 79 An invalid multi-byte source text sequence was encountered
+ 80 {0} is not a valid value for encoding {1}
+ 81 Leading surrogate was not followed by trailing
+ 82 The URL was not correctly formed
+ 83 The URL used an unsupported protocol
+ 84 Unsupported URL protocol: '{0}'
+ 85 Only localhost is supported at this time
+ 86 No protocol prefix present
+ 87 Expected // after protocol
+ 88 % must be followed by two hex digits
+ 89 Unterminated host component
+ 90 The base part of the URL cannot be relative
+ 91 The base part has too few levels to weave in relative part
+ 92 The passed index is past the end of the vector
+ 93 The element id was invalid
+ 94 When reusing the validator, no internal subset is allowed
+ 95 The passed recognizer encoding was not known
1.15 +5 -4 xml-xerces/c/src/util/Platforms/AIX/AIXPlatformUtils.cpp
Index: AIXPlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/AIX/AIXPlatformUtils.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- AIXPlatformUtils.cpp 2000/03/02 21:10:35 1.14
+++ AIXPlatformUtils.cpp 2000/03/17 23:59:59 1.15
@@ -56,6 +56,9 @@
/*
* $Log: AIXPlatformUtils.cpp,v $
+ * Revision 1.15 2000/03/17 23:59:59 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.14 2000/03/02 21:10:35 abagchi
* Added empty function platformTerm()
*
@@ -484,11 +487,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.11 +5 -4 xml-xerces/c/src/util/Platforms/HPUX/HPPlatformUtils.cpp
Index: HPPlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/HPUX/HPPlatformUtils.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- HPPlatformUtils.cpp 2000/03/02 21:10:35 1.10
+++ HPPlatformUtils.cpp 2000/03/17 23:59:59 1.11
@@ -56,6 +56,9 @@
/*
* $Log: HPPlatformUtils.cpp,v $
+ * Revision 1.11 2000/03/17 23:59:59 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.10 2000/03/02 21:10:35 abagchi
* Added empty function platformTerm()
*
@@ -544,11 +547,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.14 +5 -4 xml-xerces/c/src/util/Platforms/Linux/LinuxPlatformUtils.cpp
Index: LinuxPlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/Linux/LinuxPlatformUtils.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- LinuxPlatformUtils.cpp 2000/03/02 21:10:36 1.13
+++ LinuxPlatformUtils.cpp 2000/03/18 00:00:00 1.14
@@ -56,6 +56,9 @@
/*
* $Log: LinuxPlatformUtils.cpp,v $
+ * Revision 1.14 2000/03/18 00:00:00 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.13 2000/03/02 21:10:36 abagchi
* Added empty function platformTerm()
*
@@ -297,11 +300,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.12 +5 -4 xml-xerces/c/src/util/Platforms/OS390/OS390PlatformUtils.cpp
Index: OS390PlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/OS390/OS390PlatformUtils.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- OS390PlatformUtils.cpp 2000/03/02 21:10:37 1.11
+++ OS390PlatformUtils.cpp 2000/03/18 00:00:00 1.12
@@ -56,6 +56,9 @@
/*
* $Log: OS390PlatformUtils.cpp,v $
+ * Revision 1.12 2000/03/18 00:00:00 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.11 2000/03/02 21:10:37 abagchi
* Added empty function platformTerm()
*
@@ -566,11 +569,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.3 +5 -4 xml-xerces/c/src/util/Platforms/OS400/OS400PlatformUtils.cpp
Index: OS400PlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/OS400/OS400PlatformUtils.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OS400PlatformUtils.cpp 2000/03/02 21:10:38 1.2
+++ OS400PlatformUtils.cpp 2000/03/18 00:00:01 1.3
@@ -56,6 +56,9 @@
/**
* $Log: OS400PlatformUtils.cpp,v $
+ * Revision 1.3 2000/03/18 00:00:01 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.2 2000/03/02 21:10:38 abagchi
* Added empty function platformTerm()
*
@@ -517,11 +520,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.15 +5 -4 xml-xerces/c/src/util/Platforms/Solaris/SolarisPlatformUtils.cpp
Index: SolarisPlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/Solaris/SolarisPlatformUtils.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- SolarisPlatformUtils.cpp 2000/03/02 21:10:38 1.14
+++ SolarisPlatformUtils.cpp 2000/03/18 00:00:02 1.15
@@ -56,6 +56,9 @@
/*
* $Log: SolarisPlatformUtils.cpp,v $
+ * Revision 1.15 2000/03/18 00:00:02 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.14 2000/03/02 21:10:38 abagchi
* Added empty function platformTerm()
*
@@ -531,11 +534,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(PlatformUtilsException, File_BasePathUnderflow);
}
}
1.10 +81 -70 xml-xerces/c/src/util/Platforms/Win32/Version.rc
Index: Version.rc
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/Win32/Version.rc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Version.rc 2000/03/02 19:55:33 1.9
+++ Version.rc 2000/03/18 00:00:02 1.10
@@ -99,6 +99,10 @@
//
// String Table
//
+// ----------------------------------------------------------------
+// This text was generated from the XML error message source.
+// so do not edit this file directly!!
+// ----------------------------------------------------------------
STRINGTABLE DISCARDABLE
BEGIN
2 L"\x004E\x006F\x0074\x0061\x0074\x0069\x006F\x006E\x0020\x0027\x007B\x0030\x007D\x0027\x0020\x0068\x0061\x0073\x0020\x0061\x006C\x0072\x0065\x0061\x0064\x0079\x0020\x0062\x0065\x0065\x006E\x0020\x0064\x0065\x0063\x006C\x0061\x0072\x0065\x0064\x00"
@@ -274,79 +278,86 @@
8207 L"\x0054\x0068\x0065\x0020\x0075\x006E\x0061\x0072\x0079\x0020\x006F\x0070\x0065\x0072\x0061\x0074\x0069\x006F\x006E\x0020\x006E\x006F\x0064\x0065\x0020\x0068\x0061\x0064\x0020\x0061\x0020\x0062\x0069\x006E\x0061\x0072\x0079\x0020\x006E\x006F\x0064\x0065\x0020\x0074\x0079\x0070\x0065\x00"
8208 L"\x0055\x006E\x006B\x006E\x006F\x0077\x006E\x0020\x0063\x006F\x006E\x0074\x0065\x006E\x0074\x0020\x006D\x006F\x0064\x0065\x006C\x0020\x0074\x0079\x0070\x0065\x00"
8209 L"\x0055\x006E\x006B\x006E\x006F\x0077\x006E\x0020\x0063\x006F\x006E\x0074\x0065\x006E\x0074\x0020\x0073\x0070\x0065\x0063\x0020\x0074\x0079\x0070\x0065\x00"
- 8210 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x0073\x0020\x0065\x006D\x0070\x0074\x0079\x00"
- 8211 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0067\x0069\x0076\x0065\x006E\x0020\x0077\x0061\x0073\x0020\x0062\x0065\x0079\x006F\x006E\x0064\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0074\x006F\x0070\x00"
- 8212 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0077\x0061\x0073\x0020\x0061\x006C\x0072\x0065\x0061\x0064\x0079\x0020\x0065\x006D\x0070\x0074\x0079\x0020\x0077\x0068\x0065\x006E\x0020\x0061\x0020\x0070\x006F\x0070\x0020\x0072\x0065\x0071\x0075\x0065\x0073\x0074\x0020\x006F\x0063\x0063\x0075\x0072\x0065\x0064\x00"
- 8213 L"\x0041\x0020\x0070\x0061\x0072\x0065\x006E\x0074\x0020\x006F\x0070\x0065\x0072\x0061\x0074\x0069\x006F\x006E\x0020\x0077\x0061\x0073\x0020\x0072\x0065\x0071\x0075\x0065\x0073\x0074\x0065\x0064\x002C\x0020\x0062\x0075\x0074\x0020\x006F\x006E\x006C\x0079\x0020\x006F\x006E\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0069\x0073\x0020\x006F\x006E\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x00"
- 8214 L"\x0054\x0068\x0065\x0020\x0065\x006E\x0075\x006D\x0065\x0072\x0061\x0074\x006F\x0072\x0020\x0063\x006F\x006E\x0074\x0061\x0069\x006E\x0073\x0020\x006E\x006F\x0020\x006D\x006F\x0072\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0073\x00"
- 8215 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0066\x0069\x006C\x0065\x003A\x0020\x007B\x0030\x007D\x00"
- 8216 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0071\x0075\x0065\x0072\x0079\x0020\x0074\x0068\x0065\x0020\x0063\x0075\x0072\x0072\x0065\x006E\x0074\x0020\x0066\x0069\x006C\x0065\x0020\x0070\x006F\x0073\x0069\x0074\x0069\x006F\x006E\x00"
- 8217 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x006C\x006F\x0073\x0065\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x00"
- 8218 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0073\x0065\x0065\x006B\x0020\x0074\x006F\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0066\x0069\x006C\x0065\x00"
- 8219 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0073\x0065\x0065\x006B\x0020\x0074\x006F\x0020\x0072\x0065\x0071\x0075\x0069\x0072\x0065\x0064\x0020\x0070\x006F\x0073\x0069\x0074\x0069\x006F\x006E\x0020\x0069\x006E\x0020\x0066\x0069\x006C\x0065\x00"
- 8220 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0075\x0070\x006C\x0069\x0063\x0061\x0074\x0065\x0020\x0074\x0068\x0065\x0020\x0068\x0061\x006E\x0064\x006C\x0065\x00"
- 8221 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0072\x0065\x0061\x0064\x0020\x0064\x0061\x0074\x0061\x0020\x0066\x0072\x006F\x006D\x0020\x0066\x0069\x006C\x0065\x00"
- 8222 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0072\x0065\x0073\x0065\x0074\x0020\x0066\x0069\x006C\x0065\x0020\x0074\x006F\x0020\x0062\x0065\x0067\x0069\x006E\x006E\x0069\x006E\x0067\x00"
- 8223 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0061\x0063\x0065\x0072\x0074\x0061\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x0020\x0073\x0069\x007A\x0065\x00"
- 8224 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0074\x0065\x0072\x006D\x0069\x006E\x0065\x0020\x0062\x0061\x0073\x0065\x0020\x0070\x0061\x0074\x0068\x006E\x0061\x006D\x0065\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x00"
- 8225 L"\x0050\x0061\x0072\x0073\x0065\x0020\x006D\x0061\x0079\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0063\x0061\x006C\x006C\x0065\x0064\x0020\x0077\x0068\x0069\x006C\x0065\x0020\x0070\x0061\x0072\x0073\x0069\x006E\x0067\x00"
- 8226 L"\x0041\x0020\x0044\x004F\x0043\x0054\x0059\x0050\x0045\x0020\x0077\x0061\x0073\x0020\x0073\x0065\x0065\x006E\x0020\x0062\x0075\x0074\x0020\x0074\x0068\x0065\x0020\x0069\x006E\x0073\x0074\x0061\x006C\x006C\x0065\x0064\x0020\x0076\x0061\x006C\x0069\x0064\x0061\x0074\x006F\x0072\x0020\x0064\x006F\x0065\x0073\x0020\x006E\x006F\x0074\x0020\x0075\x006E\x0064\x0065\x0072\x0073\x0074\x0061\x006E\x0064\x0020\x0044\x0054\x0044\x0073\x00"
- 8227 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0044\x0054\x0044\x0020\x0066\x0069\x006C\x0065\x0020\x0027\x007B\x0030\x007D\x0027\x00"
- 8228 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0065\x0078\x0074\x0065\x0072\x006E\x0061\x006C\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x0020\x0027\x007B\x0030\x007D\x0027\x00"
- 8229 L"\x0054\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0069\x006E\x0070\x0075\x0074\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0065\x0078\x0070\x0065\x0063\x0074\x0065\x0064\x00"
- 8230 L"\x0054\x0068\x0065\x0020\x0068\x0061\x0073\x0068\x0020\x006D\x006F\x0064\x0075\x006C\x0075\x0073\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x007A\x0065\x0072\x006F\x00"
- 8231 L"\x0048\x0061\x0073\x0068\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0072\x0065\x0074\x0075\x0072\x006E\x0065\x0064\x0020\x0061\x006E\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0062\x0061\x0064\x0020\x0068\x0061\x0073\x0068\x0020\x0076\x0061\x006C\x0075\x0065\x00"
- 8232 L"\x0054\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0027\x007B\x0030\x007D\x0027\x0020\x0063\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0066\x006F\x0075\x006E\x0064\x0020\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x0068\x0061\x0073\x0068\x0020\x0074\x0061\x0062\x006C\x0065\x00"
- 8233 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x0072\x0065\x0061\x0074\x0065\x0020\x006D\x0075\x0074\x0065\x0078\x00"
- 8234 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x006C\x006F\x0073\x0065\x0020\x006D\x0075\x0074\x0065\x0078\x00"
- 8235 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006C\x006F\x0063\x006B\x0020\x006D\x0075\x0074\x0065\x0078\x00"
- 8236 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0075\x006E\x006C\x006F\x0063\x006B\x0020\x006D\x0075\x0074\x0065\x0078\x00"
- 8237 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0073\x0074\x0072\x006F\x0079\x0020\x006D\x0075\x0074\x0065\x0078\x00"
- 8238 L"\x0045\x0072\x0072\x006F\x0072\x0020\x006F\x006E\x0020\x007B\x0030\x007D\x0020\x004E\x0065\x0074\x0041\x0063\x0063\x0065\x0073\x0073\x006F\x0072\x002E\x0020\x004D\x0073\x0067\x003A\x0020\x007B\x0031\x007D\x00"
- 8239 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x007B\x0030\x007D\x0020\x0061\x006C\x0072\x0065\x0061\x0064\x0079\x0020\x0065\x0078\x0069\x0073\x0074\x0073\x00"
- 8240 L"\x0048\x0061\x0073\x0068\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0072\x0065\x0074\x0075\x0072\x006E\x0065\x0064\x0020\x0061\x006E\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0062\x0061\x0064\x0020\x0068\x0061\x0073\x0068\x0020\x0076\x0061\x006C\x0075\x0065\x00"
- 8241 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0069\x0064\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0076\x0061\x006C\x0069\x0064\x0020\x0066\x006F\x0072\x0020\x0074\x0068\x0069\x0073\x0020\x0070\x006F\x006F\x006C\x00"
- 8242 L"\x0054\x0068\x0065\x0020\x006D\x006F\x0064\x0075\x006C\x0075\x0073\x0020\x0076\x0061\x006C\x0075\x0065\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x007A\x0065\x0072\x006F\x00"
- 8243 L"\x0054\x0068\x0065\x0020\x0069\x006E\x0064\x0069\x0063\x0061\x0074\x0065\x0064\x0020\x0072\x0065\x0061\x0064\x0065\x0072\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x006E\x0065\x0076\x0065\x0072\x0020\x0066\x006F\x0075\x006E\x0064\x00"
- 8244 L"\x0054\x0068\x0065\x0020\x0061\x0075\x0074\x006F\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0065\x006E\x0075\x006D\x0020\x0068\x0061\x0073\x0020\x0061\x006E\x0020\x0075\x006E\x006B\x006E\x006F\x0077\x006E\x0020\x0076\x0061\x006C\x0075\x0065\x00"
- 8245 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x0072\x0065\x0061\x0074\x0065\x0020\x0061\x0020\x0063\x006F\x006E\x0076\x0065\x0072\x0074\x0065\x0072\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x003A\x0020\x007B\x0030\x007D\x00"
- 8246 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0063\x006F\x0064\x0065\x0020\x0066\x0069\x0072\x0073\x0074\x0020\x006C\x0069\x006E\x0065\x0020\x006F\x0066\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x003A\x0020\x007B\x0030\x007D\x00"
- 8247 L"\x0045\x006E\x0064\x0020\x006F\x0066\x0020\x0069\x006E\x0070\x0075\x0074\x0020\x0077\x0061\x0073\x0020\x0068\x0069\x0074\x0020\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x006D\x0069\x0064\x0064\x006C\x0065\x0020\x006F\x0066\x0020\x0061\x0020\x006D\x0075\x006C\x0074\x0069\x0062\x0079\x0074\x0065\x0020\x0073\x0065\x0071\x0075\x0065\x006E\x0063\x0065\x00"
- 8248 L"\x0049\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0073\x0065\x0063\x006F\x006E\x0064\x0020\x0062\x0079\x0074\x0065\x0020\x006F\x0066\x0020\x0061\x0020\x0055\x0054\x0046\x002D\x0038\x0020\x0063\x0068\x0061\x0072\x0061\x0063\x0074\x0065\x0072\x0020\x0073\x0065\x0071\x0075\x0065\x006E\x0063\x0065\x00"
- 8249 L"\x0049\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0073\x0075\x0072\x0072\x006F\x0067\x0061\x0074\x0065\x0020\x0063\x0068\x0061\x0072\x0061\x0063\x0074\x0065\x0072\x0020\x0066\x006F\x0075\x006E\x0064\x0020\x0069\x006E\x0020\x0055\x0054\x0046\x002D\x0038\x0020\x0064\x0061\x0074\x0061\x00"
- 8250 L"\x0054\x0068\x0065\x0020\x0063\x0075\x0072\x0072\x0065\x006E\x0074\x0020\x0074\x0072\x0061\x006E\x0073\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0073\x0065\x0072\x0076\x0069\x0063\x0065\x0020\x0064\x006F\x0065\x0073\x0020\x006E\x006F\x0074\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0020\x0073\x006F\x0075\x0072\x0063\x0065\x0020\x006F\x0066\x0066\x0073\x0065\x0074\x0020\x0069\x006E\x0066\x006F\x0072\x006D\x0061\x0074\x0069\x006F\x006E\x00"
- 8251 L"\x0045\x0042\x0043\x0044\x0049\x0043\x0020\x0066\x0069\x006C\x0065\x0073\x0020\x006D\x0075\x0073\x0074\x0020\x0070\x0072\x006F\x0076\x0069\x0064\x0065\x0020\x0061\x006E\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x003D\x0020\x0073\x0074\x0072\x0069\x006E\x0067\x00"
- 8252 L"\x0054\x0068\x0065\x0020\x0070\x0072\x0069\x006D\x0061\x0072\x0079\x0020\x0064\x006F\x0063\x0075\x006D\x0065\x006E\x0074\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x0020\x0063\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x006F\x0070\x0065\x006E\x0065\x0064\x002E\x0020\x0049\x0064\x003D\x007B\x0030\x007D\x00"
- 8253 L"\x0055\x006E\x0062\x0061\x006C\x0061\x006E\x0063\x0065\x0064\x0020\x0073\x0074\x0061\x0072\x0074\x002F\x0065\x006E\x0064\x0020\x0074\x0061\x0067\x0073\x0020\x0066\x006F\x0075\x006E\x0064\x002C\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0063\x006F\x006E\x0074\x0069\x006E\x0075\x0065\x00"
- 8254 L"\x0054\x0068\x0065\x0020\x0063\x0061\x006C\x006C\x0020\x0074\x006F\x0020\x0073\x0063\x0061\x006E\x004E\x0065\x0078\x0074\x0028\x0029\x0020\x0069\x0073\x0020\x0069\x006C\x006C\x0065\x0067\x0061\x006C\x0020\x0061\x0074\x0020\x0074\x0068\x0069\x0073\x0020\x0074\x0069\x006D\x0065\x00"
- 8255 L"\x0054\x0068\x0065\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0074\x006F\x0070\x0020\x006F\x0066\x0020\x0073\x0074\x0061\x0063\x006B\x00"
- 8256 L"\x0054\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x0073\x0020\x0065\x006D\x0070\x0074\x0079\x002C\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0061\x0063\x0063\x0065\x0073\x0073\x0020\x006D\x0065\x006D\x0062\x0065\x0072\x0073\x00"
- 8257 L"\x0054\x0068\x0065\x0020\x0074\x0061\x0072\x0067\x0065\x0074\x0020\x0062\x0075\x0066\x0066\x0065\x0072\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0068\x0061\x0076\x0065\x0020\x0061\x0020\x006D\x0061\x0078\x0020\x0073\x0069\x007A\x0065\x0020\x006F\x0066\x0020\x007A\x0065\x0072\x006F\x00"
- 8258 L"\x0054\x0068\x0065\x0020\x0067\x0069\x0076\x0065\x006E\x0020\x0072\x0061\x0064\x0069\x0078\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x002E\x0020\x0055\x0073\x0065\x0020\x0032\x002C\x0020\x0038\x002C\x0020\x0031\x0030\x002C\x0020\x006F\x0072\x0020\x0031\x0036\x00"
- 8259 L"\x0054\x0068\x0065\x0020\x0074\x0061\x0072\x0067\x0065\x0074\x0020\x0062\x0075\x0066\x0066\x0065\x0072\x0020\x0069\x0073\x0020\x0074\x006F\x006F\x0020\x0073\x006D\x0061\x006C\x006C\x0020\x0074\x006F\x0020\x0061\x0063\x0063\x0065\x0070\x0074\x0020\x0074\x0068\x0065\x0020\x0072\x0065\x0073\x0075\x006C\x0074\x0073\x00"
- 8260 L"\x0054\x0068\x0065\x0020\x0073\x0074\x0061\x0072\x0074\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0072\x0069\x006E\x0067\x00"
- 8261 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0073\x0074\x0061\x006E\x0064\x0061\x0072\x0064\x0020\x0065\x0072\x0072\x00"
- 8262 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0073\x0074\x0061\x006E\x0064\x0061\x0072\x0064\x0020\x006F\x0075\x0074\x00"
- 8263 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0063\x006F\x006E\x0073\x006F\x006C\x0065\x00"
- 8264 L"\x0053\x0074\x0072\x0069\x006E\x0067\x0020\x0070\x006F\x006F\x006C\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x006C\x0065\x0067\x0061\x006C\x00"
- 8265 L"\x0054\x0068\x0065\x0020\x0062\x006C\x006F\x0063\x006B\x0020\x006F\x0066\x0020\x0058\x004D\x004C\x0020\x0064\x0061\x0074\x0061\x0020\x0063\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0074\x0072\x0061\x006E\x0073\x0063\x006F\x0064\x0065\x0064\x00"
+ 8210 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0072\x0065\x006E\x0074\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0068\x0061\x0073\x0020\x006E\x006F\x0020\x0063\x006F\x006E\x0074\x0065\x006E\x0074\x0020\x0073\x0070\x0065\x0063\x0020\x006E\x006F\x0064\x0065\x00"
+ 8211 L"\x0054\x0068\x0065\x0020\x0063\x0072\x0065\x0061\x0074\x0069\x006F\x006E\x0020\x0072\x0065\x0061\x0073\x006F\x006E\x0020\x0065\x006E\x0075\x006D\x0020\x0068\x0061\x0073\x0020\x0061\x006E\x0020\x0075\x006E\x006B\x006E\x006F\x0077\x006E\x0020\x0076\x0061\x006C\x0075\x0065\x00"
+ 8212 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x0073\x0020\x0065\x006D\x0070\x0074\x0079\x00"
+ 8213 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0067\x0069\x0076\x0065\x006E\x0020\x0077\x0061\x0073\x0020\x0062\x0065\x0079\x006F\x006E\x0064\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0074\x006F\x0070\x00"
+ 8214 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0077\x0061\x0073\x0020\x0061\x006C\x0072\x0065\x0061\x0064\x0079\x0020\x0065\x006D\x0070\x0074\x0079\x0020\x0077\x0068\x0065\x006E\x0020\x0061\x0020\x0070\x006F\x0070\x0020\x0072\x0065\x0071\x0075\x0065\x0073\x0074\x0020\x006F\x0063\x0063\x0075\x0072\x0065\x0064\x00"
+ 8215 L"\x0041\x0020\x0070\x0061\x0072\x0065\x006E\x0074\x0020\x006F\x0070\x0065\x0072\x0061\x0074\x0069\x006F\x006E\x0020\x0077\x0061\x0073\x0020\x0072\x0065\x0071\x0075\x0065\x0073\x0074\x0065\x0064\x002C\x0020\x0062\x0075\x0074\x0020\x006F\x006E\x006C\x0079\x0020\x006F\x006E\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0069\x0073\x0020\x006F\x006E\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x00"
+ 8216 L"\x0054\x0068\x0065\x0020\x0065\x006E\x0075\x006D\x0065\x0072\x0061\x0074\x006F\x0072\x0020\x0063\x006F\x006E\x0074\x0061\x0069\x006E\x0073\x0020\x006E\x006F\x0020\x006D\x006F\x0072\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0073\x00"
+ 8217 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0066\x0069\x006C\x0065\x003A\x0020\x007B\x0030\x007D\x00"
+ 8218 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0071\x0075\x0065\x0072\x0079\x0020\x0074\x0068\x0065\x0020\x0063\x0075\x0072\x0072\x0065\x006E\x0074\x0020\x0066\x0069\x006C\x0065\x0020\x0070\x006F\x0073\x0069\x0074\x0069\x006F\x006E\x00"
+ 8219 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x006C\x006F\x0073\x0065\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x00"
+ 8220 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0073\x0065\x0065\x006B\x0020\x0074\x006F\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0066\x0069\x006C\x0065\x00"
+ 8221 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0073\x0065\x0065\x006B\x0020\x0074\x006F\x0020\x0072\x0065\x0071\x0075\x0069\x0072\x0065\x0064\x0020\x0070\x006F\x0073\x0069\x0074\x0069\x006F\x006E\x0020\x0069\x006E\x0020\x0066\x0069\x006C\x0065\x00"
+ 8222 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0075\x0070\x006C\x0069\x0063\x0061\x0074\x0065\x0020\x0074\x0068\x0065\x0020\x0068\x0061\x006E\x0064\x006C\x0065\x00"
+ 8223 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0072\x0065\x0061\x0064\x0020\x0064\x0061\x0074\x0061\x0020\x0066\x0072\x006F\x006D\x0020\x0066\x0069\x006C\x0065\x00"
+ 8224 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0072\x0065\x0073\x0065\x0074\x0020\x0066\x0069\x006C\x0065\x0020\x0074\x006F\x0020\x0062\x0065\x0067\x0069\x006E\x006E\x0069\x006E\x0067\x00"
+ 8225 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0061\x0063\x0065\x0072\x0074\x0061\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x0020\x0073\x0069\x007A\x0065\x00"
+ 8226 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0074\x0065\x0072\x006D\x0069\x006E\x0065\x0020\x0062\x0061\x0073\x0065\x0020\x0070\x0061\x0074\x0068\x006E\x0061\x006D\x0065\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0066\x0069\x006C\x0065\x00"
+ 8227 L"\x0054\x0068\x0065\x0020\x0062\x0061\x0073\x0065\x0020\x0070\x0061\x0074\x0068\x0020\x0068\x0061\x0064\x0020\x0074\x006F\x006F\x0020\x0066\x0065\x0077\x0020\x006C\x0065\x0076\x0065\x006C\x0073\x0020\x0074\x006F\x0020\x0077\x0065\x0061\x0076\x0065\x0020\x0069\x006E\x0020\x0072\x0065\x006C\x0061\x0074\x0069\x0076\x0065\x0020\x0070\x0061\x0072\x0074\x00"
+ 8228 L"\x0050\x0061\x0072\x0073\x0065\x0020\x006D\x0061\x0079\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0063\x0061\x006C\x006C\x0065\x0064\x0020\x0077\x0068\x0069\x006C\x0065\x0020\x0070\x0061\x0072\x0073\x0069\x006E\x0067\x00"
+ 8229 L"\x0041\x0020\x0044\x004F\x0043\x0054\x0059\x0050\x0045\x0020\x0077\x0061\x0073\x0020\x0073\x0065\x0065\x006E\x0020\x0062\x0075\x0074\x0020\x0074\x0068\x0065\x0020\x0069\x006E\x0073\x0074\x0061\x006C\x006C\x0065\x0064\x0020\x0076\x0061\x006C\x0069\x0064\x0061\x0074\x006F\x0072\x0020\x0064\x006F\x0065\x0073\x0020\x006E\x006F\x0074\x0020\x0075\x006E\x0064\x0065\x0072\x0073\x0074\x0061\x006E\x0064\x0020\x0044\x0054\x0044\x0073\x00"
+ 8230 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0044\x0054\x0044\x0020\x0066\x0069\x006C\x0065\x0020\x0027\x007B\x0030\x007D\x0027\x00"
+ 8231 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006F\x0070\x0065\x006E\x0020\x0065\x0078\x0074\x0065\x0072\x006E\x0061\x006C\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x0020\x0027\x007B\x0030\x007D\x0027\x00"
+ 8232 L"\x0054\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0069\x006E\x0070\x0075\x0074\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0065\x0078\x0070\x0065\x0063\x0074\x0065\x0064\x00"
+ 8233 L"\x0054\x0068\x0065\x0020\x0068\x0061\x0073\x0068\x0020\x006D\x006F\x0064\x0075\x006C\x0075\x0073\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x007A\x0065\x0072\x006F\x00"
+ 8234 L"\x0048\x0061\x0073\x0068\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0072\x0065\x0074\x0075\x0072\x006E\x0065\x0064\x0020\x0061\x006E\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0062\x0061\x0064\x0020\x0068\x0061\x0073\x0068\x0020\x0076\x0061\x006C\x0075\x0065\x00"
+ 8235 L"\x0054\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0027\x007B\x0030\x007D\x0027\x0020\x0063\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0066\x006F\x0075\x006E\x0064\x0020\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x0068\x0061\x0073\x0068\x0020\x0074\x0061\x0062\x006C\x0065\x00"
+ 8236 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x0072\x0065\x0061\x0074\x0065\x0020\x006D\x0075\x0074\x0065\x0078\x00"
+ 8237 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x006C\x006F\x0073\x0065\x0020\x006D\x0075\x0074\x0065\x0078\x00"
+ 8238 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x006C\x006F\x0063\x006B\x0020\x006D\x0075\x0074\x0065\x0078\x00"
+ 8239 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0075\x006E\x006C\x006F\x0063\x006B\x0020\x006D\x0075\x0074\x0065\x0078\x00"
+ 8240 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0073\x0074\x0072\x006F\x0079\x0020\x006D\x0075\x0074\x0065\x0078\x00"
+ 8241 L"\x0045\x0072\x0072\x006F\x0072\x0020\x006F\x006E\x0020\x007B\x0030\x007D\x0020\x004E\x0065\x0074\x0041\x0063\x0063\x0065\x0073\x0073\x006F\x0072\x002E\x0020\x004D\x0073\x0067\x003A\x0020\x007B\x0031\x007D\x00"
+ 8242 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x007B\x0030\x007D\x0020\x0061\x006C\x0072\x0065\x0061\x0064\x0079\x0020\x0065\x0078\x0069\x0073\x0074\x0073\x00"
+ 8243 L"\x0048\x0061\x0073\x0068\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x006B\x0065\x0079\x0020\x0072\x0065\x0074\x0075\x0072\x006E\x0065\x0064\x0020\x0061\x006E\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x0062\x0061\x0064\x0020\x0068\x0061\x0073\x0068\x0020\x0076\x0061\x006C\x0075\x0065\x00"
+ 8244 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0069\x0064\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0076\x0061\x006C\x0069\x0064\x0020\x0066\x006F\x0072\x0020\x0074\x0068\x0069\x0073\x0020\x0070\x006F\x006F\x006C\x00"
+ 8245 L"\x0054\x0068\x0065\x0020\x006D\x006F\x0064\x0075\x006C\x0075\x0073\x0020\x0076\x0061\x006C\x0075\x0065\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x007A\x0065\x0072\x006F\x00"
+ 8246 L"\x0054\x0068\x0065\x0020\x0069\x006E\x0064\x0069\x0063\x0061\x0074\x0065\x0064\x0020\x0072\x0065\x0061\x0064\x0065\x0072\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x006E\x0065\x0076\x0065\x0072\x0020\x0066\x006F\x0075\x006E\x0064\x00"
+ 8247 L"\x0054\x0068\x0065\x0020\x0061\x0075\x0074\x006F\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0065\x006E\x0075\x006D\x0020\x0068\x0061\x0073\x0020\x0061\x006E\x0020\x0075\x006E\x006B\x006E\x006F\x0077\x006E\x0020\x0076\x0061\x006C\x0075\x0065\x00"
+ 8248 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x0072\x0065\x0061\x0074\x0065\x0020\x0061\x0020\x0063\x006F\x006E\x0076\x0065\x0072\x0074\x0065\x0072\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x003A\x0020\x007B\x0030\x007D\x00"
+ 8249 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0064\x0065\x0063\x006F\x0064\x0065\x0020\x0066\x0069\x0072\x0073\x0074\x0020\x006C\x0069\x006E\x0065\x0020\x006F\x0066\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x003A\x0020\x007B\x0030\x007D\x00"
+ 8250 L"\x0045\x006E\x0064\x0020\x006F\x0066\x0020\x0069\x006E\x0070\x0075\x0074\x0020\x0077\x0061\x0073\x0020\x0068\x0069\x0074\x0020\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x006D\x0069\x0064\x0064\x006C\x0065\x0020\x006F\x0066\x0020\x0061\x0020\x006D\x0075\x006C\x0074\x0069\x0062\x0079\x0074\x0065\x0020\x0073\x0065\x0071\x0075\x0065\x006E\x0063\x0065\x00"
+ 8251 L"\x0054\x0068\x0065\x0020\x0063\x0075\x0072\x0072\x0065\x006E\x0074\x0020\x0074\x0072\x0061\x006E\x0073\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0073\x0065\x0072\x0076\x0069\x0063\x0065\x0020\x0064\x006F\x0065\x0073\x0020\x006E\x006F\x0074\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0020\x0073\x006F\x0075\x0072\x0063\x0065\x0020\x006F\x0066\x0066\x0073\x0065\x0074\x0020\x0069\x006E\x0066\x006F\x0072\x006D\x0061\x0074\x0069\x006F\x006E\x00"
+ 8252 L"\x0045\x0042\x0043\x0044\x0049\x0043\x0020\x0066\x0069\x006C\x0065\x0073\x0020\x006D\x0075\x0073\x0074\x0020\x0070\x0072\x006F\x0076\x0069\x0064\x0065\x0020\x0061\x006E\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x003D\x0020\x0073\x0074\x0072\x0069\x006E\x0067\x00"
+ 8253 L"\x0054\x0068\x0065\x0020\x0070\x0072\x0069\x006D\x0061\x0072\x0079\x0020\x0064\x006F\x0063\x0075\x006D\x0065\x006E\x0074\x0020\x0065\x006E\x0074\x0069\x0074\x0079\x0020\x0063\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x006F\x0070\x0065\x006E\x0065\x0064\x002E\x0020\x0049\x0064\x003D\x007B\x0030\x007D\x00"
+ 8254 L"\x0055\x006E\x0062\x0061\x006C\x0061\x006E\x0063\x0065\x0064\x0020\x0073\x0074\x0061\x0072\x0074\x002F\x0065\x006E\x0064\x0020\x0074\x0061\x0067\x0073\x0020\x0066\x006F\x0075\x006E\x0064\x002C\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0063\x006F\x006E\x0074\x0069\x006E\x0075\x0065\x00"
+ 8255 L"\x0054\x0068\x0065\x0020\x0063\x0061\x006C\x006C\x0020\x0074\x006F\x0020\x0073\x0063\x0061\x006E\x004E\x0065\x0078\x0074\x0028\x0029\x0020\x0069\x0073\x0020\x0069\x006C\x006C\x0065\x0067\x0061\x006C\x0020\x0061\x0074\x0020\x0074\x0068\x0069\x0073\x0020\x0074\x0069\x006D\x0065\x00"
+ 8256 L"\x0054\x0068\x0065\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0074\x006F\x0070\x0020\x006F\x0066\x0020\x0073\x0074\x0061\x0063\x006B\x00"
+ 8257 L"\x0054\x0068\x0065\x0020\x0073\x0074\x0061\x0063\x006B\x0020\x0069\x0073\x0020\x0065\x006D\x0070\x0074\x0079\x002C\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0061\x0063\x0063\x0065\x0073\x0073\x0020\x006D\x0065\x006D\x0062\x0065\x0072\x0073\x00"
+ 8258 L"\x0054\x0068\x0065\x0020\x0074\x0061\x0072\x0067\x0065\x0074\x0020\x0062\x0075\x0066\x0066\x0065\x0072\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0068\x0061\x0076\x0065\x0020\x0061\x0020\x006D\x0061\x0078\x0020\x0073\x0069\x007A\x0065\x0020\x006F\x0066\x0020\x007A\x0065\x0072\x006F\x00"
+ 8259 L"\x0054\x0068\x0065\x0020\x0067\x0069\x0076\x0065\x006E\x0020\x0072\x0061\x0064\x0069\x0078\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x002E\x0020\x0055\x0073\x0065\x0020\x0032\x002C\x0020\x0038\x002C\x0020\x0031\x0030\x002C\x0020\x006F\x0072\x0020\x0031\x0036\x00"
+ 8260 L"\x0054\x0068\x0065\x0020\x0074\x0061\x0072\x0067\x0065\x0074\x0020\x0062\x0075\x0066\x0066\x0065\x0072\x0020\x0069\x0073\x0020\x0074\x006F\x006F\x0020\x0073\x006D\x0061\x006C\x006C\x0020\x0074\x006F\x0020\x0061\x0063\x0063\x0065\x0070\x0074\x0020\x0074\x0068\x0065\x0020\x0072\x0065\x0073\x0075\x006C\x0074\x0073\x00"
+ 8261 L"\x0054\x0068\x0065\x0020\x0073\x0074\x0061\x0072\x0074\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0073\x0074\x0072\x0069\x006E\x0067\x00"
+ 8262 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0073\x0074\x0061\x006E\x0064\x0061\x0072\x0064\x0020\x0065\x0072\x0072\x00"
+ 8263 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0073\x0074\x0061\x006E\x0064\x0061\x0072\x0064\x0020\x006F\x0075\x0074\x00"
+ 8264 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0077\x0072\x0069\x0074\x0065\x0020\x0074\x006F\x0020\x0063\x006F\x006E\x0073\x006F\x006C\x0065\x00"
+ 8265 L"\x0053\x0074\x0072\x0069\x006E\x0067\x0020\x0070\x006F\x006F\x006C\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x006C\x0065\x0067\x0061\x006C\x00"
8266 L"\x0043\x006F\x0075\x006C\x0064\x0020\x006E\x006F\x0074\x0020\x0063\x0072\x0065\x0061\x0074\x0065\x0020\x0061\x0020\x0064\x0065\x0066\x0061\x0075\x006C\x0074\x0020\x0074\x0072\x0061\x006E\x0073\x0063\x006F\x0064\x0065\x0072\x00"
8267 L"\x0054\x0068\x0065\x0020\x006D\x0061\x0078\x0069\x006D\x0075\x006D\x0020\x0073\x0069\x007A\x0065\x0020\x0074\x006F\x0020\x0078\x006C\x0061\x0074\x0020\x0069\x0073\x0020\x006C\x0061\x0072\x0067\x0065\x0072\x0020\x0074\x0068\x0061\x006E\x0020\x0074\x0068\x0065\x0020\x0064\x0065\x0063\x006C\x0061\x0072\x0065\x0064\x0020\x0062\x006C\x006F\x0063\x006B\x0020\x0073\x0069\x007A\x0065\x00"
- 8268 L"\x0047\x006F\x0074\x0020\x0061\x006E\x0020\x0072\x0065\x0070\x0072\x0065\x0073\x0065\x006E\x0074\x0061\x0062\x006C\x0065\x0020\x0063\x006F\x0064\x0065\x0020\x0070\x006F\x0069\x006E\x0074\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x007B\x0030\x007D\x00"
- 8269 L"\x0041\x0020\x0073\x006F\x0075\x0072\x0063\x0065\x0020\x0063\x0068\x0061\x0072\x0061\x0063\x0074\x0065\x0072\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0069\x006E\x0020\x0074\x0068\x0065\x0020\x0063\x006F\x0064\x0065\x0020\x0070\x006F\x0069\x006E\x0074\x0020\x0073\x0065\x0074\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x007B\x0030\x007D\x00"
- 8270 L"\x0054\x0068\x0065\x0020\x0055\x0052\x004C\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0063\x006F\x0072\x0072\x0065\x0063\x0074\x006C\x0079\x0020\x0066\x006F\x0072\x006D\x0065\x0064\x00"
- 8271 L"\x0054\x0068\x0065\x0020\x0055\x0052\x004C\x0020\x0075\x0073\x0065\x0064\x0020\x0061\x006E\x0020\x0075\x006E\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x00"
- 8272 L"\x0055\x006E\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0055\x0052\x004C\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x003A\x0020\x0027\x007B\x0030\x007D\x0027\x00"
- 8273 L"\x004F\x006E\x006C\x0079\x0020\x006C\x006F\x0063\x0061\x006C\x0068\x006F\x0073\x0074\x0020\x0069\x0073\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0061\x0074\x0020\x0074\x0068\x0069\x0073\x0020\x0074\x0069\x006D\x0065\x00"
- 8274 L"\x004E\x006F\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x0020\x0070\x0072\x0065\x0066\x0069\x0078\x0020\x0070\x0072\x0065\x0073\x0065\x006E\x0074\x00"
- 8275 L"\x0045\x0078\x0070\x0065\x0063\x0074\x0065\x0064\x0020\x002F\x002F\x0020\x0061\x0066\x0074\x0065\x0072\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x00"
- 8276 L"\x0025\x0020\x006D\x0075\x0073\x0074\x0020\x0062\x0065\x0020\x0066\x006F\x006C\x006C\x006F\x0077\x0065\x0064\x0020\x0062\x0079\x0020\x0074\x0077\x006F\x0020\x0068\x0065\x0078\x0020\x0064\x0069\x0067\x0069\x0074\x0073\x00"
- 8277 L"\x0055\x006E\x0074\x0065\x0072\x006D\x0069\x006E\x0061\x0074\x0065\x0064\x0020\x0068\x006F\x0073\x0074\x0020\x0063\x006F\x006D\x0070\x006F\x006E\x0065\x006E\x0074\x00"
- 8278 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0076\x0065\x0063\x0074\x006F\x0072\x00"
- 8279 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x00"
- 8280 L"\x0057\x0068\x0065\x006E\x0020\x0072\x0065\x0075\x0073\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x0076\x0061\x006C\x0069\x0064\x0061\x0074\x006F\x0072\x002C\x0020\x006E\x006F\x0020\x0069\x006E\x0074\x0065\x0072\x006E\x0061\x006C\x0020\x0073\x0075\x0062\x0073\x0065\x0074\x0020\x0069\x0073\x0020\x0061\x006C\x006C\x006F\x0077\x0065\x0064\x00"
- 8281 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0072\x0065\x0063\x006F\x0067\x006E\x0069\x007A\x0065\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x006B\x006E\x006F\x0077\x006E\x00"
+ 8268 L"\x0055\x006E\x0069\x0063\x006F\x0064\x0065\x0020\x0063\x0068\x0061\x0072\x0020\x007B\x0030\x007D\x0020\x0069\x0073\x0020\x0072\x0065\x0070\x0072\x0065\x0073\x0065\x006E\x0074\x0061\x0062\x006C\x0065\x0020\x0069\x006E\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x007B\x0031\x007D\x00"
+ 8269 L"\x0043\x0068\x0061\x0072\x0061\x0063\x0074\x0065\x0072\x0020\x007B\x0030\x007D\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0076\x0061\x006C\x0069\x0064\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x007B\x0031\x007D\x00"
+ 8270 L"\x0054\x0068\x0065\x0020\x0072\x0065\x0071\x0075\x0065\x0073\x0074\x0065\x0064\x0020\x0062\x006C\x006F\x0063\x006B\x0020\x0073\x0069\x007A\x0065\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0065\x0071\x0075\x0061\x006C\x0020\x0074\x006F\x0020\x0074\x0068\x0065\x0020\x0073\x0069\x007A\x0065\x0020\x0073\x0065\x0074\x0020\x0064\x0075\x0072\x0069\x006E\x0067\x0020\x0063\x006F\x006E\x0073\x0074\x0072\x0075\x0063\x0074\x0069\x006F\x006E\x00"
+ 8271 L"\x0041\x006E\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x0020\x006D\x0075\x006C\x0074\x0069\x002D\x0062\x0079\x0074\x0065\x0020\x0073\x006F\x0075\x0072\x0063\x0065\x0020\x0074\x0065\x0078\x0074\x0020\x0073\x0065\x0071\x0075\x0065\x006E\x0063\x0065\x0020\x0077\x0061\x0073\x0020\x0065\x006E\x0063\x006F\x0075\x006E\x0074\x0065\x0072\x0065\x0064\x00"
+ 8272 L"\x007B\x0030\x007D\x0020\x0069\x0073\x0020\x006E\x006F\x0074\x0020\x0061\x0020\x0076\x0061\x006C\x0069\x0064\x0020\x0076\x0061\x006C\x0075\x0065\x0020\x0066\x006F\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x007B\x0031\x007D\x00"
+ 8273 L"\x004C\x0065\x0061\x0064\x0069\x006E\x0067\x0020\x0073\x0075\x0072\x0072\x006F\x0067\x0061\x0074\x0065\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0066\x006F\x006C\x006C\x006F\x0077\x0065\x0064\x0020\x0062\x0079\x0020\x0074\x0072\x0061\x0069\x006C\x0069\x006E\x0067\x00"
+ 8274 L"\x0054\x0068\x0065\x0020\x0055\x0052\x004C\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x0063\x006F\x0072\x0072\x0065\x0063\x0074\x006C\x0079\x0020\x0066\x006F\x0072\x006D\x0065\x0064\x00"
+ 8275 L"\x0054\x0068\x0065\x0020\x0055\x0052\x004C\x0020\x0075\x0073\x0065\x0064\x0020\x0061\x006E\x0020\x0075\x006E\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x00"
+ 8276 L"\x0055\x006E\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0055\x0052\x004C\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x003A\x0020\x0027\x007B\x0030\x007D\x0027\x00"
+ 8277 L"\x004F\x006E\x006C\x0079\x0020\x006C\x006F\x0063\x0061\x006C\x0068\x006F\x0073\x0074\x0020\x0069\x0073\x0020\x0073\x0075\x0070\x0070\x006F\x0072\x0074\x0065\x0064\x0020\x0061\x0074\x0020\x0074\x0068\x0069\x0073\x0020\x0074\x0069\x006D\x0065\x00"
+ 8278 L"\x004E\x006F\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x0020\x0070\x0072\x0065\x0066\x0069\x0078\x0020\x0070\x0072\x0065\x0073\x0065\x006E\x0074\x00"
+ 8279 L"\x0045\x0078\x0070\x0065\x0063\x0074\x0065\x0064\x0020\x002F\x002F\x0020\x0061\x0066\x0074\x0065\x0072\x0020\x0070\x0072\x006F\x0074\x006F\x0063\x006F\x006C\x00"
+ 8280 L"\x0025\x0020\x006D\x0075\x0073\x0074\x0020\x0062\x0065\x0020\x0066\x006F\x006C\x006C\x006F\x0077\x0065\x0064\x0020\x0062\x0079\x0020\x0074\x0077\x006F\x0020\x0068\x0065\x0078\x0020\x0064\x0069\x0067\x0069\x0074\x0073\x00"
+ 8281 L"\x0055\x006E\x0074\x0065\x0072\x006D\x0069\x006E\x0061\x0074\x0065\x0064\x0020\x0068\x006F\x0073\x0074\x0020\x0063\x006F\x006D\x0070\x006F\x006E\x0065\x006E\x0074\x00"
+ 8282 L"\x0054\x0068\x0065\x0020\x0062\x0061\x0073\x0065\x0020\x0070\x0061\x0072\x0074\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0055\x0052\x004C\x0020\x0063\x0061\x006E\x006E\x006F\x0074\x0020\x0062\x0065\x0020\x0072\x0065\x006C\x0061\x0074\x0069\x0076\x0065\x00"
+ 8283 L"\x0054\x0068\x0065\x0020\x0062\x0061\x0073\x0065\x0020\x0070\x0061\x0072\x0074\x0020\x0068\x0061\x0073\x0020\x0074\x006F\x006F\x0020\x0066\x0065\x0077\x0020\x006C\x0065\x0076\x0065\x006C\x0073\x0020\x0074\x006F\x0020\x0077\x0065\x0061\x0076\x0065\x0020\x0069\x006E\x0020\x0072\x0065\x006C\x0061\x0074\x0069\x0076\x0065\x0020\x0070\x0061\x0072\x0074\x00"
+ 8284 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0069\x006E\x0064\x0065\x0078\x0020\x0069\x0073\x0020\x0070\x0061\x0073\x0074\x0020\x0074\x0068\x0065\x0020\x0065\x006E\x0064\x0020\x006F\x0066\x0020\x0074\x0068\x0065\x0020\x0076\x0065\x0063\x0074\x006F\x0072\x00"
+ 8285 L"\x0054\x0068\x0065\x0020\x0065\x006C\x0065\x006D\x0065\x006E\x0074\x0020\x0069\x0064\x0020\x0077\x0061\x0073\x0020\x0069\x006E\x0076\x0061\x006C\x0069\x0064\x00"
+ 8286 L"\x0057\x0068\x0065\x006E\x0020\x0072\x0065\x0075\x0073\x0069\x006E\x0067\x0020\x0074\x0068\x0065\x0020\x0076\x0061\x006C\x0069\x0064\x0061\x0074\x006F\x0072\x002C\x0020\x006E\x006F\x0020\x0069\x006E\x0074\x0065\x0072\x006E\x0061\x006C\x0020\x0073\x0075\x0062\x0073\x0065\x0074\x0020\x0069\x0073\x0020\x0061\x006C\x006C\x006F\x0077\x0065\x0064\x00"
+ 8287 L"\x0054\x0068\x0065\x0020\x0070\x0061\x0073\x0073\x0065\x0064\x0020\x0072\x0065\x0063\x006F\x0067\x006E\x0069\x007A\x0065\x0072\x0020\x0065\x006E\x0063\x006F\x0064\x0069\x006E\x0067\x0020\x0077\x0061\x0073\x0020\x006E\x006F\x0074\x0020\x006B\x006E\x006F\x0077\x006E\x00"
END
+
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
1.15 +10 -4 xml-xerces/c/src/util/Platforms/Win32/Win32PlatformUtils.cpp
Index: Win32PlatformUtils.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Platforms/Win32/Win32PlatformUtils.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Win32PlatformUtils.cpp 2000/03/17 02:37:55 1.14
+++ Win32PlatformUtils.cpp 2000/03/18 00:00:02 1.15
@@ -56,6 +56,9 @@
/*
* $Log: Win32PlatformUtils.cpp,v $
+ * Revision 1.15 2000/03/18 00:00:02 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.14 2000/03/17 02:37:55 rahulj
* First cut at adding HTTP capability via native sockets.
* Still need to add:
@@ -533,11 +536,9 @@
basePtr--;
}
+ // The base cannot provide enough levels, so its in error/
if (basePtr < basePath)
- {
- // The base cannot provide enough levels, so its in error
- // <TBD>
- }
+ ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_BasePathUnderflow);
}
}
1.16 +146 -34 xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp
Index: ICUTransService.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ICUTransService.cpp 2000/03/02 19:55:34 1.15
+++ ICUTransService.cpp 2000/03/18 00:00:03 1.16
@@ -56,6 +56,9 @@
/*
* $Log: ICUTransService.cpp,v $
+ * Revision 1.16 2000/03/18 00:00:03 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.15 2000/03/02 19:55:34 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -148,9 +151,13 @@
// When XMLCh and ICU's UChar are not the same size, we have to do a temp
// conversion of all strings. These local helper methods make that easier.
//
-static UChar* convertToUChar(const XMLCh* const toConvert)
+static UChar* convertToUChar( const XMLCh* const toConvert
+ , const unsigned int srcLen = 0)
{
- UChar* tmpBuf = new UChar[XMLString::stringLen(toConvert) + 1];
+ const unsigned int actualLen = srcLen
+ ? srcLen : XMLString::stringLen(toConvert);
+
+ UChar* tmpBuf = new UChar[srcLen + 1];
const XMLCh* srcPtr = toConvert;
UChar* outPtr = tmpBuf;
while (*srcPtr)
@@ -400,36 +407,8 @@
// ---------------------------------------------------------------------------
// ICUTranscoder: The virtual transcoder API
// ---------------------------------------------------------------------------
-XMLCh ICUTranscoder::transcodeOne( const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // Check for stupid stuff
- if (!srcBytes)
- return 0;
-
- UErrorCode err = U_ZERO_ERROR;
- const XMLByte* startSrc = srcData;
- const UChar chRet = ucnv_getNextUChar
- (
- fConverter
- , (const char**)&startSrc
- , (const char*)((srcData + srcBytes) - 1)
- , &err
- );
-
- // Bail out if an error
- if (U_FAILURE(err))
- return 0;
-
- // Calculate the bytes eaten and return the char
- bytesEaten = startSrc - srcData;
- return XMLCh(chRet);
-}
-
-
unsigned int
-ICUTranscoder::transcodeXML(const XMLByte* const srcData
+ICUTranscoder::transcodeFrom(const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
, const unsigned int maxChars
@@ -441,7 +420,7 @@
checkBlockSize(maxChars);
#endif
- // Set up pointers to the source buffers
+ // Set up pointers to the start and end of the source buffer
const XMLByte* startSrc = srcData;
const XMLByte* endSrc = srcData + srcCount;
@@ -478,7 +457,23 @@
{
if (orgTarget != (UChar*)toFill)
delete [] orgTarget;
- ThrowXML(TranscodingException, XMLExcepts::Trans_CouldNotXCodeXMLData);
+
+ if (fFixed)
+ {
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)(*startTarget), tmpBuf, 16, 16);
+ ThrowXML2
+ (
+ TranscodingException
+ , XMLExcepts::Trans_BadSrcCP
+ , tmpBuf
+ , getEncodingName()
+ );
+ }
+ else
+ {
+ ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
+ }
}
// Calculate the bytes eaten and store in caller's param
@@ -542,8 +537,114 @@
}
+unsigned int
+ICUTranscoder::transcodeTo( const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ //
+ // Get a pointer to the buffer to transcode. If UChar and XMLCh are
+ // the same size here, then use the original. Else, create a temp
+ // one and put a janitor on it.
+ //
+ const UChar* srcPtr;
+ UChar* tmpBufPtr = 0;
+ if (sizeof(XMLCh) == sizeof(UChar))
+ {
+ srcPtr = (const UChar*)srcData;
+ }
+ else
+ {
+ tmpBufPtr = convertToUChar(srcData, srcCount);
+ srcPtr = tmpBufPtr;
+ }
+ ArrayJanitor<UChar> janTmpBuf(tmpBufPtr);
+ //
+ // Ok, lets transcode as many chars as we we can in one shot. The
+ // ICU API gives enough info not to have to do this one char by char.
+ //
+ UErrorCode err = U_ZERO_ERROR;
+ XMLByte* startTarget = toFill;
+ const UChar* startSrc = srcPtr;
+ ucnv_fromUnicode
+ (
+ fConverter
+ , (char**)&startTarget
+ , (char*)(startTarget + maxBytes)
+ , &startSrc
+ , srcPtr + srcCount
+ , 0
+ , false
+ , &err
+ );
+
+ //
+ // <TBD>
+ // This is really right yet. We need to differentiate between
+ // just an error and the use of a replacement char.
+ //
+ if (err != U_ZERO_ERROR)
+ {
+ }
+
+ // Fill in the chars we ate from the input
+ charsEaten = startSrc - srcPtr;
+
+ // Return the chars we stored
+ return startTarget - toFill;
+}
+
+
+bool ICUTranscoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ //
+ // If the passed value is really a surrogate embedded together, then
+ // we need to break it out into its two chars. Else just one. While
+ // we are ate it, convert them to UChar format if required.
+ //
+ UChar srcBuf[2];
+ unsigned int srcCount = 1;
+ if (toCheck & 0xFFFF0000)
+ {
+ srcBuf[0] = UChar((toCheck >> 10) + 0xD800);
+ srcBuf[1] = UChar(toCheck & 0x3FF) + 0xDC00;
+ srcCount++;
+ }
+ else
+ {
+ srcBuf[0] = UChar(toCheck);
+ }
+
+ char tmpBuf[64];
+
+ UErrorCode err = U_ZERO_ERROR;
+ char* startTarget = tmpBuf;
+ const UChar* startSrc = srcBuf;
+ ucnv_fromUnicode
+ (
+ fConverter
+ , &startTarget
+ , startTarget + 64
+ , &startSrc
+ , srcBuf + srcCount
+ , 0
+ , false
+ , &err
+ );
+
+ if (err != U_ZERO_ERROR)
+ return false;
+
+ return true;
+}
+
+
+
// ---------------------------------------------------------------------------
// ICULCPTranscoder: Constructors and Destructor
// ---------------------------------------------------------------------------
@@ -700,8 +801,9 @@
retBuf = new char[targetLen + 1];
//
- // Lock now while we call the converter. Use a faux block to dot he
+ // Lock now while we call the converter. Use a faux block to do the
// lock so that it unlocks immediately afterwards.
+ //
UErrorCode err = U_ZERO_ERROR;
int32_t targetCap;
{
@@ -870,6 +972,10 @@
else
targetBuf = new UChar[maxChars + 1];
+ //
+ // Use a faux block to enforce a lock on the converter, which will
+ // unlock immediately after its completed.
+ //
UErrorCode err = U_ZERO_ERROR;
{
XMLMutexLock lockConverter(&fMutex);
@@ -945,6 +1051,10 @@
// Insure that the temp buffer, if any, gets cleaned up via the nc pointer
ArrayJanitor<UChar> janTmp(ncActual);
+ //
+ // Use a faux block to enforce a lock on the converter while we do this.
+ // It will be released immediately after its done.
+ //
UErrorCode err = U_ZERO_ERROR;
int32_t targetCap;
{
1.10 +22 -8 xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.hpp
Index: ICUTransService.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/ICU/ICUTransService.hpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ICUTransService.hpp 2000/03/02 19:55:34 1.9
+++ ICUTransService.hpp 2000/03/18 00:00:03 1.10
@@ -56,6 +56,9 @@
/*
* $Log: ICUTransService.hpp,v $
+ * Revision 1.10 2000/03/18 00:00:03 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.9 2000/03/02 19:55:34 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -178,15 +181,8 @@
// -----------------------------------------------------------------------
// Implementation of the virtual transcoder interface
// -----------------------------------------------------------------------
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -194,6 +190,22 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
+
private :
1.11 +139 -34 xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.cpp
Index: Win32TransService.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Win32TransService.cpp 2000/03/07 23:45:36 1.10
+++ Win32TransService.cpp 2000/03/18 00:00:04 1.11
@@ -56,6 +56,9 @@
/*
* $Log: Win32TransService.cpp,v $
+ * Revision 1.11 2000/03/18 00:00:04 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.10 2000/03/07 23:45:36 roddey
* First cut for additions to Win32 xcode. Based very loosely on a
* prototype from Eric Ulevik.
@@ -107,6 +110,7 @@
// ---------------------------------------------------------------------------
#include <util/TranscodingException.hpp>
#include <util/XMLException.hpp>
+#include <util/XMLString.hpp>
#include <util/XMLUni.hpp>
#include "Win32TransService.hpp"
#include <windows.h>
@@ -212,39 +216,8 @@
// ---------------------------------------------------------------------------
// Win32Transcoder: The virtual transcoder API
// ---------------------------------------------------------------------------
-XMLCh Win32Transcoder::transcodeOne(const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten)
-{
- // See how many bytes we'll need for one wide char
- const unsigned int toEat = ::IsDBCSLeadByteEx(fWinCP, *srcData) ? 2 : 1;
-
- // Make sure we have this many bytes. If not, return a failure
- if (toEat > srcBytes)
- return 0;
-
- // We have enough bytes, so try to do it
- XMLCh outCh;
- if (::MultiByteToWideChar
- (
- fWinCP
- , MB_PRECOMPOSED | MB_ERR_INVALID_CHARS
- , (const char*)srcData
- , toEat
- , &outCh
- , 1) != 1)
- {
- ThrowXML(TranscodingException, XMLExcepts::Trans_CouldNotXCodeXMLData);
- }
-
- // Indicate the bytes eaten and return the char we got
- bytesEaten = toEat;
- return outCh;
-}
-
-
unsigned int
-Win32Transcoder::transcodeXML( const XMLByte* const srcData
+Win32Transcoder::transcodeFrom( const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
, const unsigned int maxChars
@@ -291,8 +264,22 @@
if (converted != 1)
{
- DWORD err = ::GetLastError();
- ThrowXML(TranscodingException, XMLExcepts::Trans_CouldNotXCodeXMLData);
+ if (toEat == 1)
+ {
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)(*inPtr), tmpBuf, 16, 16);
+ ThrowXML
+ (
+ TranscodingException
+ , XMLExcepts::Trans_BadSrcCP
+ , tmpBuf
+ , getEncodingName()
+ );
+ }
+ else
+ {
+ ThrowXML(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
+ }
}
// Update the char sizes array for this round
@@ -310,6 +297,123 @@
return (outPtr - toFill);
}
+
+unsigned int
+Win32Transcoder::transcodeTo(const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options)
+{
+ // Get pointers to the start and end of each buffer
+ const XMLCh* srcPtr = srcData;
+ const XMLCh* srcEnd = srcData + srcCount;
+ XMLByte* outPtr = toFill;
+ XMLByte* outEnd = toFill + maxBytes;
+
+ //
+ // Now loop until we either get our max chars, or cannot get a whole
+ // character from the input buffer.
+ //
+ // NOTE: We have to use a loop for this unfortunately because the
+ // conversion API is too dumb to tell us how many chars it converted if
+ // it couldn't do the whole source.
+ //
+ BOOL usedDef;
+ while ((outPtr < outEnd) && (srcPtr < srcEnd))
+ {
+ //
+ // Do one char and see if it made it.
+ const unsigned int bytesStored = ::WideCharToMultiByte
+ (
+ fWinCP
+ , WC_COMPOSITECHECK | WC_SEPCHARS
+ , srcPtr
+ , 1
+ , (char*)outPtr
+ , outEnd - outPtr
+ , 0
+ , &usedDef
+ );
+
+ // If we didn't transcode anything, then we are done
+ if (!bytesStored)
+ break;
+
+ //
+ // If the defaault char was used and the options indicate that
+ // this isn't allowed, then throw.
+ //
+ if (usedDef && (options == UnRep_Throw))
+ {
+ XMLCh tmpBuf[16];
+ XMLString::binToText((unsigned int)*srcPtr, tmpBuf, 16, 16);
+ ThrowXML2
+ (
+ TranscodingException
+ , XMLExcepts::Trans_Unrepresentable
+ , tmpBuf
+ , getEncodingName()
+ );
+ }
+
+ // Update our pointers
+ outPtr += bytesStored;
+ srcPtr++;
+ }
+
+ // Update the chars eaten
+ charsEaten = srcPtr - srcData;
+
+ // And return the bytes we stored
+ return outPtr - toFill;
+}
+
+
+bool Win32Transcoder::canTranscodeTo(const unsigned int toCheck) const
+{
+ //
+ // If the passed value is really a surrogate embedded together, then
+ // we need to break it out into its two chars. Else just one.
+ //
+ XMLCh srcBuf[2];
+ unsigned int srcCount = 1;
+ if (toCheck & 0xFFFF0000)
+ {
+ srcBuf[0] = XMLCh((toCheck >> 10) + 0xD800);
+ srcBuf[1] = XMLCh(toCheck & 0x3FF) + 0xDC00;
+ srcCount++;
+ }
+ else
+ {
+ srcBuf[0] = XMLCh(toCheck);
+ }
+
+ //
+ // Use a local temp buffer that would hold any sane multi-byte char
+ // sequence and try to transcode this guy into it.
+ //
+ char tmpBuf[64];
+
+ BOOL usedDef;
+ const unsigned int bytesStored = ::WideCharToMultiByte
+ (
+ fWinCP
+ , WC_COMPOSITECHECK | WC_SEPCHARS
+ , srcBuf
+ , srcCount
+ , tmpBuf
+ , 64
+ , 0
+ , &usedDef
+ );
+
+ if (!bytesStored || usedDef)
+ return false;
+
+ return true;
+}
// ---------------------------------------------------------------------------
1.9 +20 -8 xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.hpp
Index: Win32TransService.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/Win32/Win32TransService.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Win32TransService.hpp 2000/03/07 23:45:36 1.8
+++ Win32TransService.hpp 2000/03/18 00:00:04 1.9
@@ -56,6 +56,9 @@
/*
* $Log: Win32TransService.hpp,v $
+ * Revision 1.9 2000/03/18 00:00:04 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.8 2000/03/07 23:45:36 roddey
* First cut for additions to Win32 xcode. Based very loosely on a
* prototype from Eric Ulevik.
@@ -179,15 +182,8 @@
// -----------------------------------------------------------------------
// Implementation of the virtual transcoder interface
// -----------------------------------------------------------------------
- virtual XMLCh transcodeOne
+ virtual unsigned int transcodeFrom
(
- const XMLByte* const srcData
- , const unsigned int srcBytes
- , unsigned int& bytesEaten
- );
-
- virtual unsigned int transcodeXML
- (
const XMLByte* const srcData
, const unsigned int srcCount
, XMLCh* const toFill
@@ -195,6 +191,21 @@
, unsigned int& bytesEaten
, unsigned char* const charSizes
);
+
+ virtual unsigned int transcodeTo
+ (
+ const XMLCh* const srcData
+ , const unsigned int srcCount
+ , XMLByte* const toFill
+ , const unsigned int maxBytes
+ , unsigned int& charsEaten
+ , const UnRepOpts options
+ );
+
+ virtual bool canTranscodeTo
+ (
+ const unsigned int toCheck
+ ) const;
private :
1.2 +11 -3 xml-xerces/c/src/util/Transcoders/Win32/Win32TransService2.cpp
Index: Win32TransService2.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/Transcoders/Win32/Win32TransService2.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Win32TransService2.cpp 2000/03/08 23:40:37 1.1
+++ Win32TransService2.cpp 2000/03/18 00:00:04 1.2
@@ -56,6 +56,9 @@
/*
* $Log: Win32TransService2.cpp,v $
+ * Revision 1.2 2000/03/18 00:00:04 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.1 2000/03/08 23:40:37 roddey
* Oops, I think I forgot to commit this new file
*
@@ -293,7 +296,12 @@
// ---------------------------------------------------------------------------
void Win32TransService::initCPMap()
{
- // Open up the registry key that contains the info we want
+ //
+ // Open up the registry key that contains the info we want. Note that,
+ // if this key does not exist, then we just return. It will just mean
+ // that we don't have any support except for intrinsic encodings supported
+ // by the parser itself (and the LCP support of course.
+ //
HKEY charsetKey;
if (::RegOpenKeyExA
(
@@ -303,7 +311,7 @@
, KEY_READ
, &charsetKey))
{
- XMLPlatformUtils::panic(XMLPlatformUtils::Panic_NoTransService);
+ return;
}
//
1.7 +7 -1 xml-xerces/c/src/validators/DTD/DTDValidator.cpp
Index: DTDValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/DTD/DTDValidator.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DTDValidator.cpp 2000/03/03 01:29:35 1.6
+++ DTDValidator.cpp 2000/03/18 00:00:05 1.7
@@ -56,6 +56,9 @@
/*
* $Log: DTDValidator.cpp,v $
+ * Revision 1.7 2000/03/18 00:00:05 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.6 2000/03/03 01:29:35 roddey
* Added a scanReset()/parseReset() method to the scanner and
* parsers, to allow for reset after early exit from a progressive parse.
@@ -842,7 +845,7 @@
else
{
#if defined(XERCES_DEBUG)
- // <TBD> Should throw here
+ ThrowXML(RuntimeException, XMLExcepts::DTD_UnknownCreateReason);
#endif
}
}
1.4 +6 -3 xml-xerces/c/src/validators/DTD/MixedContentModel.cpp
Index: MixedContentModel.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/DTD/MixedContentModel.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MixedContentModel.cpp 2000/03/02 19:55:39 1.3
+++ MixedContentModel.cpp 2000/03/18 00:00:05 1.4
@@ -56,6 +56,9 @@
/*
* $Log: MixedContentModel.cpp,v $
+ * Revision 1.4 2000/03/18 00:00:05 roddey
+ * Initial updates for two way transcoding support
+ *
* Revision 1.3 2000/03/02 19:55:39 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
@@ -107,9 +110,7 @@
//
const ContentSpecNode* curNode = parentElem.getContentSpec();
if (!curNode)
- {
- // <TBD> This is an error
- }
+ ThrowXML(RuntimeException, XMLExcepts::CM_NoParentCSN);
// And now call the private recursive method that iterates the tree
buildChildList(*curNode, childIds);