[xml] encoding support with xmlParseInNodeContext
- From: Aaron Patterson <aaron patterson gmail com>
- To: xml gnome org
- Subject: [xml] encoding support with xmlParseInNodeContext
- Date: Wed, 3 Feb 2010 20:34:09 -0800
I can't seem to pass an encoding to xmlParseInNodeContext. This is
problematic when dealing with UTF-8 HTML documents. I can tell
libxml2 what encoding to use when originally parsing the document, but
it looks like that is completely ignored when using
xmlParseInNodeContext. Reference nodes in HTML documents completely
ignore the original document encoding and use ISO-8859-1.
Here is a sample program to illustrate the problem:
http://pastie.org/808860
I tried putting together a patch, and it didn't seem to work:
http://pastie.org/808862
Ideally, I would like a function similar to xmlParseInNodeContext, but
one that takes an encoding as a parameter. Thanks!
--
Aaron Patterson
http://tenderlovemaking.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]