× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hello,

D encoding        s              5A   Inz('Big5')

encoding = encoding + X'00';
p = XML_ParserCreate(%addr(encoding));

Expat does not natively support Big5. From the Expat reference manual:

   Parser Creation

   XML_Parser XMLCALL
   XML_ParserCreate(const XML_Char *encoding);

   Construct a new parser. If encoding is non-null, it specifies a
   character encoding to use for the document. This overrides the document
   encoding declaration. There are four built-in encodings:

    * US-ASCII
    * UTF-8
    * UTF-16
    * ISO-8859-1

   Any other value will invoke a call to the UnknownEncodingHandler.


How do I set the encoding support DBCS ?


Look under "XML_SetUnknownEncodingHandler" in the Expat reference manual (member REF.HTML in source file EXPAT in LIBEXPAT) for information on how to configure an unknown encoding handler.


I've never worked with Big5, but I did try to make one for EBCDIC and failed. It seems to assume that certain characters will always match the same values as they do in ASCII, even with an unknown encoding handler. If your Big5 text is using an ASCII encoding, you'll probably be okay. If not, you'll probably have to convert it to an ASCII version of Big5, and parse that with your unknown encoding handler.

Also, it's not necessary to append x'00' to the string. (That was only necessary in V3R2, starting with V3R7 we have options(*string)) just call it as:
p = XML_ParserCreate('Big5');



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.