<p><font class="fixed_width" face="Courier, Monospaced">Hi, <br> </font></p><p><font class="fixed_width" face="Courier, Monospaced">I am parsing html documents using the html parser from libxml2, and if <br> the encoding is included in the document it works perfectly but if it
<br> is not, I think it does not work well (probably because I am doing <br> something wrong). <br> </font></p><p><font class="fixed_width" face="Courier, Monospaced">As it is said in <a target="_blank" href="http://www.google.com/url?sa=D&q=http://xmlsoft.org/encoding.html">
http://xmlsoft.org/encoding.html</a> the parser should <br> detect the encoding. So I tested it putting an utf-8 word in a file and <br> it does not detect it (it generates a wrong string). Example: <br> reducción --> reducción.
<br> </font></p><p><font class="fixed_width" face="Courier, Monospaced">I just use the parser as a SAX parser because I do not need a tree, so <br> to parse the file I use the htmlParseChunk() function and I create the <br>
context with htmlCreatePushParser(). <br> </font></p><p><font class="fixed_width" face="Courier, Monospaced">Is it posible that the encoding detection does not work with <br> htmlParseChunk? If it is so, what method should I use?
<br> </font></p><font class="fixed_width" face="Courier, Monospaced">Thanks, Cesar </font><br>