--- parser3/src/include/pa_charset.h 2003/09/25 09:15:02 1.24 +++ parser3/src/include/pa_charset.h 2003/11/06 09:11:35 1.26 @@ -8,7 +8,7 @@ #ifndef PA_CHARSET_H #define PA_CHARSET_H -static const char* IDENT_CHARSET_H="$Date: 2003/09/25 09:15:02 $"; +static const char* IDENT_CHARSET_H="$Date: 2003/11/06 09:11:35 $"; #include "pa_exception.h" @@ -24,6 +24,7 @@ namespace PCRE { #ifdef XML #include "libxml/encoding.h" +#include "gdome.h" #endif // defines @@ -45,11 +46,6 @@ class GdomeDOMString_auto_ptr; // helpers -struct Charset_TransRec { - XMLCh intCh; - XMLByte extCh; -}; - typedef Hash HashStringString; /** charset holds name & transcode tables @@ -107,11 +103,25 @@ private: public: struct Tables { + struct Rec { + XMLCh intCh; + XMLByte extCh; + }; + XMLCh fromTable[0x100]; - Charset_TransRec toTable[MAX_CHARSET_UNI_CODES]; + Rec toTable[MAX_CHARSET_UNI_CODES]; uint toTableSize; }; + struct UTF8CaseTable { + struct Rec { + XMLCh from, to; + }; + + uint size; + Rec* records; + }; + private: const String::Body FNAME; @@ -154,6 +164,15 @@ private: }; + +// externs + +extern Charset::UTF8CaseTable UTF8CaseToUpper; +extern Charset::UTF8CaseTable UTF8CaseToLower; +void change_case_UTF8(const XMLByte* srcData, XMLByte* toFill, + const Charset::UTF8CaseTable& table); + + #ifdef XML /// Auto-object used to track GdomeDOMString usage class GdomeDOMString_auto_ptr {