Re: How can I use xml file encode gb2312 with XML::Parser
by Duncan Cameron other posts by this author
Dec 5 2001 7:08PM messages near this date
view in the new Beta List Site
Re: ANN: XML::Xalan 0.32
|
=?gb2312?B?tPC4tDogSG93IGNhbiBJIHVzZSB4bWwgZmlsZSBlbmNvZGUgZ2IyMw==?=
=?gb2312?B?MTIgd2l0aCBYTUw6OlBhcnNlcg==?=
On 2001-12-04 ¹Ëܲ <guyii@[...].com> wrote:
> HI,everybody:
> I need a help.
> Today my boss tell me to write a program which can read some xml
> encoded by Chinese GB2312. I try to use XML::Parser to check it ,but I
> can't find the file GB2312.enc at "XML/Parser/Encodings/".So the parser
> said "can't find gb2312.enc at /.../.../XML/Parser/Encodings/". SoI try
> to use the file GB2312.enc which at "/site/5.7.2/Encode/" but it seem
> can't work.The Parser said "gb2312.enc is not a map file".And I find the
> file at /XML/Parser/Encodings/ is a binary file,and the other is a text
> file.
The file gb2312.enc at "/site/5.7.2/Encode/" is a GB2312 encoding used
by Perl itself. I guess that it is equivalent but not the same as an
encoding used by XML-Parser.
XML-Parser seems to use its own format encodings , of which there is
not one for GB2312. It uses the module XML-Encoding to create the
encodings but I can't find where that module would get a suitable
source for GB2312.
Michel Rodriguez, who reads this list, has written a couple of articles
about XML-Parser and encodings,
http://standards.ieee.org/resources/spasystem/twig/encoding/encoding.html
and
http://www.xml.com/pub/a/2000/04/26/encodings/index.html
he might be able to explain how to create a GB2312 encoding for XML-Parser.
> I find a lot of documents to explain how to encode XML .But I can't
> do it well.So please help me.
> My question is: Can I use the file which at Encode's dir to replace
> the file at XML/Parser/Encodins.If can't ,what can I do to parser the
> xml encoded by GB2312.
As you point out in your response to another reply, converting to UTF-8
or 16, processing that and then converting back might work.
Regards
Duncan Cameron
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml
Thread:
Duncan Cameron
=?gb2312?B?ucvcsg==?=
|