• Daniel Veillard's avatar
    Add options to ignore the internal encoding · c62efc84
    Daniel Veillard authored
    For both XML and HTML, the document can provide an encoding
    either in XMLDecl in XML, or as a meta element in HTML head.
    This adds options to ignore those encodings if the encoding
    is known in advace for example if the content had been converted
    before being passed to the parser.
    
    * parser.c include/libxml/parser.h: add XML_PARSE_IGNORE_ENC option
      for XML parsing
    * include/libxml/HTMLparser.h HTMLparser.c: adds the
      HTML_PARSE_IGNORE_ENC for HTML parsing
    * HTMLtree.c: fix the handling of saving when an unknown encoding is
      defined in meta document header
    * xmllint.c: add a --noenc option to activate the new parser options
    c62efc84