diff options
author | Steve Huston <shuston@riverace.com> | 2004-08-25 16:05:42 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2004-08-25 16:05:42 +0000 |
commit | e5d61a6b2ce1c05ecea6c1e8fc5ecb8fb61cee1c (patch) | |
tree | e07acff382b581b292ecac00a720e279c518bc28 /ACEXML | |
parent | 6d338931df4886b640e6a78e44e47941568c8f42 (diff) | |
download | ATCD-e5d61a6b2ce1c05ecea6c1e8fc5ecb8fb61cee1c.tar.gz |
ChangeLogTag:Wed Aug 25 11:46:49 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACEXML')
-rw-r--r-- | ACEXML/common/XML_Types.h | 5 | ||||
-rw-r--r-- | ACEXML/parser/parser/Parser.cpp | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ACEXML/common/XML_Types.h b/ACEXML/common/XML_Types.h index 1693253b0db..07169ee86af 100644 --- a/ACEXML/common/XML_Types.h +++ b/ACEXML/common/XML_Types.h @@ -53,11 +53,12 @@ typedef char ACEXML_UTF8; * using the built-in conversion functions as they only perform simple * copy without any encoding conversion. */ +typedef ACE_TCHAR ACEXML_Char; # if defined (ACE_USES_WCHAR) -typedef ACEXML_UTF16 ACEXML_Char; +//typedef ACEXML_UTF16 ACEXML_Char; typedef ACE_WString ACEXML_String; # else -typedef ACEXML_UTF8 ACEXML_Char; +//typedef ACEXML_UTF8 ACEXML_Char; typedef ACE_CString ACEXML_String; # endif /* ACE_USES_WCHAR */ diff --git a/ACEXML/parser/parser/Parser.cpp b/ACEXML/parser/parser/Parser.cpp index 7eb09e744e4..bc922000990 100644 --- a/ACEXML/parser/parser/Parser.cpp +++ b/ACEXML/parser/parser/Parser.cpp @@ -2225,9 +2225,14 @@ ACEXML_Parser::parse_char_reference (ACEXML_Char *buf, size_t& len) if (!this->isChar (sum)) return -1; int clen; -#if defined (ACE_USES_WCHAR) // UTF-16 +#if defined (ACE_USES_WCHAR) +# if (ACE_SIZEOF_WCHAR == 2) // UTF-16 if ((clen = ACEXML_Transcoder::ucs42utf16 (sum, buf, len)) < 0) return -1; +# elif (ACE_SIZEOF_WCHAR == 4) // UCS 4 + buf [0] = sum; + buf [1] = 0; +# endif /* ACE_SIZEOF_WCHAR */ #else // or UTF-8 if ((clen = ACEXML_Transcoder::ucs42utf8 (sum, buf, len)) < 0) |