Re: [xml] encoding
- From: Malcolm Tredinnick <malcolm commsecure com au>
- To: Bar Gam <barg05 hotmail co il>
- Cc: xml gnome org
- Subject: Re: [xml] encoding
- Date: Wed, 23 Feb 2005 09:26:09 +1100
On Tue, 2005-02-22 at 23:26 +0200, Bar Gam wrote:
Hello
Hi :)
If I try to parse a document encoded in iso-8859-8 - should it be
converted to UTF-8, or is it supported and handled by the parser on
the fly? If the content should be converted (and deconverted) - what
method should be used in this
?case
Providing the document encoding is correctly specified and providing you
have Iconv support compiled in, the conversion to UTF-8 will be done for
you automatically as libxml2 parses the document.
If the document encoding is not specified in the xml declaration at the
top of the file (<?xml encoding="..."?>), there is a way to pass it in
directly when using the libxml API -- this is needed because of the way
HTTP documents have their encoding specified, for example. But I cannot
remember the exact call off the top of my head.
You can see if you have Iconv support available by looking at the output
of 'xmllint --version'.
Cheers,
Malcolm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]