- win32config.h.in: updated
- xmlversion.h.in: crap forgot to update this, this mean 2.1.0
  lacks iconv support :-( need to release 2.1.1
- configure.in: release 2.1.1
- HTMLparser: fixed bug #14784
- xpath.c HTMLparser.c encoding.c parser.c: fix warning raised
  by Windows compiler
- HTMLparser.c SAX.c HTMLtree.h tree.h: create HTML document in
  the SAX startDocument() callback.
- TODO: updated
- rebuild doc
Daniel
diff --git a/doc/html/gnome-xml-encoding.html b/doc/html/gnome-xml-encoding.html
index 4326f3c..8634dd6 100644
--- a/doc/html/gnome-xml-encoding.html
+++ b/doc/html/gnome-xml-encoding.html
@@ -4,7 +4,7 @@
 >encoding</TITLE
 ><META
 NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
+CONTENT="Modular DocBook HTML Stylesheet Version 1.33"><LINK
 REL="HOME"
 TITLE="Gnome XML Library Reference Manual"
 HREF="book1.html"><LINK
@@ -20,9 +20,6 @@
 ><BODY
 BGCOLOR="#FFFFFF"
 TEXT="#000000"
-LINK="#0000FF"
-VLINK="#840084"
-ALINK="#0000FF"
 ><DIV
 CLASS="NAVHEADER"
 ><TABLE
@@ -114,22 +111,19 @@
 ></TABLE
 ></DIV
 ><H1
-><A
-NAME="GNOME-XML-ENCODING"
->encoding</A
-></H1
+>encoding</H1
 ><DIV
 CLASS="REFNAMEDIV"
 ><A
-NAME="AEN10933"
+NAME="AEN13874"
 ></A
 ><H2
 >Name</H2
->encoding&nbsp;--&nbsp;</DIV
+>encoding &#8212; </DIV
 ><DIV
 CLASS="REFSYNOPSISDIV"
 ><A
-NAME="AEN10936"
+NAME="AEN13877"
 ></A
 ><H2
 >Synopsis</H2
@@ -152,21 +146,33 @@
 HREF="gnome-xml-encoding.html#XMLCHARENCODINGINPUTFUNC"
 >*xmlCharEncodingInputFunc</A
 >)     (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);
 int         (<A
 HREF="gnome-xml-encoding.html#XMLCHARENCODINGOUTPUTFUNC"
 >*xmlCharEncodingOutputFunc</A
 >)    (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);
+struct      <A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+>;
 typedef     <A
 HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
 >xmlCharEncodingHandlerPtr</A
 >;
 void        <A
+HREF="gnome-xml-encoding.html#XMLINITCHARENCODINGHANDLERS"
+>xmlInitCharEncodingHandlers</A
+>     (void);
+void        <A
+HREF="gnome-xml-encoding.html#XMLCLEANUPCHARENCODINGHANDLERS"
+>xmlCleanupCharEncodingHandlers</A
+>  (void);
+void        <A
 HREF="gnome-xml-encoding.html#XMLREGISTERCHARENCODINGHANDLER"
 >xmlRegisterCharEncodingHandler</A
 >  (<A
@@ -174,6 +180,28 @@
 >xmlCharEncodingHandlerPtr</A
 > handler);
 <A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> <A
+HREF="gnome-xml-encoding.html#XMLDETECTCHARENCODING"
+>xmlDetectCharEncoding</A
+>       (unsigned char *in,
+                                             int len);
+<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> <A
+HREF="gnome-xml-encoding.html#XMLPARSECHARENCODING"
+>xmlParseCharEncoding</A
+>        (const char *name);
+const char* <A
+HREF="gnome-xml-encoding.html#XMLGETCHARENCODINGNAME"
+>xmlGetCharEncodingName</A
+>          (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> enc);
+<A
 HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLERPTR"
 >xmlCharEncodingHandlerPtr</A
 > <A
@@ -192,25 +220,62 @@
 >xmlFindCharEncodingHandler</A
 >
                                             (const char *name);
-<A
-HREF="gnome-xml-encoding.html#XMLCHARENCODING"
->xmlCharEncoding</A
-> <A
-HREF="gnome-xml-encoding.html#XMLDETECTCHARENCODING"
->xmlDetectCharEncoding</A
->       (unsigned char *in,
-                                             int len);
-<A
-HREF="gnome-xml-encoding.html#XMLCHARENCODING"
->xmlCharEncoding</A
-> <A
-HREF="gnome-xml-encoding.html#XMLPARSECHARENCODING"
->xmlParseCharEncoding</A
->        (const char *name);
-void        <A
-HREF="gnome-xml-encoding.html#XMLINITCHARENCODINGHANDLERS"
->xmlInitCharEncodingHandlers</A
->     (void);</PRE
+int         <A
+HREF="gnome-xml-encoding.html#XMLCHECKUTF8"
+>xmlCheckUTF8</A
+>                    (unsigned char *utf);
+int         <A
+HREF="gnome-xml-encoding.html#XMLCHARENCOUTFUNC"
+>xmlCharEncOutFunc</A
+>               (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);
+int         <A
+HREF="gnome-xml-encoding.html#XMLCHARENCINFUNC"
+>xmlCharEncInFunc</A
+>                (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);
+int         <A
+HREF="gnome-xml-encoding.html#XMLCHARENCFIRSTLINE"
+>xmlCharEncFirstLine</A
+>             (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);
+int         <A
+HREF="gnome-xml-encoding.html#XMLCHARENCCLOSEFUNC"
+>xmlCharEncCloseFunc</A
+>             (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler);</PRE
 ></TD
 ></TR
 ></TABLE
@@ -218,7 +283,7 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN10955"
+NAME="AEN13915"
 ></A
 ><H2
 >Description</H2
@@ -228,14 +293,14 @@
 ><DIV
 CLASS="REFSECT1"
 ><A
-NAME="AEN10958"
+NAME="AEN13918"
 ></A
 ><H2
 >Details</H2
 ><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN10960"
+NAME="AEN13920"
 ></A
 ><H3
 ><A
@@ -285,7 +350,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN10965"
+NAME="AEN13925"
 ></A
 ><H3
 ><A
@@ -302,7 +367,7 @@
 ><PRE
 CLASS="PROGRAMLISTING"
 >int         (*xmlCharEncodingInputFunc)     (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);</PRE
 ></TD
@@ -412,7 +477,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN10995"
+NAME="AEN13955"
 ></A
 ><H3
 ><A
@@ -429,7 +494,7 @@
 ><PRE
 CLASS="PROGRAMLISTING"
 >int         (*xmlCharEncodingOutputFunc)    (unsigned char *out,
-                                             int outlen,
+                                             int *outlen,
                                              unsigned char *in,
                                              int *inlen);</PRE
 ></TD
@@ -539,20 +604,127 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11025"
+NAME="AEN13985"
 ></A
 ><H3
 ><A
-NAME="XMLCHARENCODINGHANDLERPTR"
+NAME="XMLCHARENCODINGHANDLER"
 ></A
->xmlCharEncodingHandlerPtr</H3
+>struct xmlCharEncodingHandler</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>struct xmlCharEncodingHandler {
+    char                       *name;
+    xmlCharEncodingInputFunc   input;
+    xmlCharEncodingOutputFunc  output;
+#ifdef LIBXML_ICONV_ENABLED
+    iconv_t                    iconv_in;
+    iconv_t                    iconv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+};</PRE
+></TD
+></TR
+></TABLE
 ><P
 ></P
 ></DIV
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11029"
+NAME="AEN13990"
+></A
+><H3
+><A
+NAME="XMLCHARENCODINGHANDLERPTR"
+></A
+>xmlCharEncodingHandlerPtr</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;</PRE
+></TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN13995"
+></A
+><H3
+><A
+NAME="XMLINITCHARENCODINGHANDLERS"
+></A
+>xmlInitCharEncodingHandlers ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlInitCharEncodingHandlers     (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Initialize the char encoding support, it registers the default
+encoding supported.
+NOTE: while public, this function usually doesn't need to be called
+in normal processing.</P
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14001"
+></A
+><H3
+><A
+NAME="XMLCLEANUPCHARENCODINGHANDLERS"
+></A
+>xmlCleanupCharEncodingHandlers ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>void        xmlCleanupCharEncodingHandlers  (void);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Cleanup the memory allocated for the char encoding support, it
+unregisters all the encoding handlers.</P
+><P
+></P
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14007"
 ></A
 ><H3
 ><A
@@ -605,7 +777,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>  the xmlCharEncodingHandlerPtr handler block</TD
 ></TR
 ></TABLE
 ><P
@@ -615,7 +787,269 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11045"
+NAME="AEN14023"
+></A
+><H3
+><A
+NAME="XMLDETECTCHARENCODING"
+></A
+>xmlDetectCharEncoding ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> xmlDetectCharEncoding       (unsigned char *in,
+                                             int len);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Guess the encoding of the entity using the first bytes of the entity content
+accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>in</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  a pointer to the first bytes of the XML entity, must be at least
+4 bytes long.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>len</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  pointer to the length of the buffer</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>one of the XML_CHAR_ENCODING_... values.</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14047"
+></A
+><H3
+><A
+NAME="XMLPARSECHARENCODING"
+></A
+>xmlParseCharEncoding ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+><A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> xmlParseCharEncoding        (const char *name);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Conpare the string to the known encoding schemes already known. Note
+that the comparison is case insensitive accordingly to the section
+[XML] 4.3.3 Character Encoding in Entities.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>name</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the encoding name as parsed, in UTF-8 format (ASCII actually)</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>one of the XML_CHAR_ENCODING_... values or XML_CHAR_ENCODING_NONE
+if not recognized.</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14067"
+></A
+><H3
+><A
+NAME="XMLGETCHARENCODINGNAME"
+></A
+>xmlGetCharEncodingName ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>const char* xmlGetCharEncodingName          (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODING"
+>xmlCharEncoding</A
+> enc);</PRE
+></TD
+></TR
+></TABLE
+><P
+>The "canonical" name for XML encoding.
+C.f. http://www.w3.org/TR/REC-xml<GTKDOCLINK
+HREF="CHARENCODING"
+>charencoding</GTKDOCLINK
+>
+Section 4.3.3  Character Encoding in Entities</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>enc</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  the encoding</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the canonical name for the given encoding</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14088"
 ></A
 ><H3
 ><A
@@ -672,7 +1106,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>  a string describing the char encoding.</TD
 ></TR
 ><TR
 ><TD
@@ -687,7 +1121,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>the handler or NULL if not found</TD
 ></TR
 ></TABLE
 ><P
@@ -697,7 +1131,7 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11066"
+NAME="AEN14109"
 ></A
 ><H3
 ><A
@@ -774,13 +1208,13 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11085"
+NAME="AEN14128"
 ></A
 ><H3
 ><A
-NAME="XMLDETECTCHARENCODING"
+NAME="XMLCHECKUTF8"
 ></A
->xmlDetectCharEncoding ()</H3
+>xmlCheckUTF8 ()</H3
 ><TABLE
 BORDER="0"
 BGCOLOR="#D6E8FF"
@@ -790,17 +1224,27 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
-><A
-HREF="gnome-xml-encoding.html#XMLCHARENCODING"
->xmlCharEncoding</A
-> xmlDetectCharEncoding       (unsigned char *in,
-                                             int len);</PRE
+>int         xmlCheckUTF8                    (unsigned char *utf);</PRE
 ></TD
 ></TR
 ></TABLE
 ><P
->Guess the encoding of the entity using the first bytes of the entity content
-accordingly of the non-normative appendix F of the XML-1.0 recommendation.</P
+>Checks <TT
+CLASS="PARAMETER"
+><I
+>utf</I
+></TT
+> for being valid utf-8. <TT
+CLASS="PARAMETER"
+><I
+>utf</I
+></TT
+> is assumed to be
+null-terminated. This function is not super-strict, as it will
+allow longer utf-8 sequences than necessary. Note that Java is
+capable of producing these sequences if provoked. Also note, this
+routine checks for the 4-byte maxiumum size, but does not check for
+0x10ffff maximum value.</P
 ><P
 ></P
 ><DIV
@@ -822,6 +1266,141 @@
 ><TT
 CLASS="PARAMETER"
 ><I
+>utf</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> Pointer to putative utf-8 encoded string.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+> true if <TT
+CLASS="PARAMETER"
+><I
+>utf</I
+></TT
+> is valid.</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14150"
+></A
+><H3
+><A
+NAME="XMLCHARENCOUTFUNC"
+></A
+>xmlCharEncOutFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int         xmlCharEncOutFunc               (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Generic front-end for the encoding handler output function
+a first call with <TT
+CLASS="PARAMETER"
+><I
+>in</I
+></TT
+> == NULL has to be made firs to initiate the 
+output in case of non-stateless encoding needing to initiate their
+state or the output (like the BOM in UTF16).
+In case of UTF8 sequence conversion errors for the given encoder,
+the content will be automatically remapped to a CharRef sequence.</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>handler</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>	char enconding transformation data structure</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>out</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  an xmlBuffer for the output.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
 >in</I
 ></TT
 >&nbsp;:</TD
@@ -829,24 +1408,7 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
-></TR
-><TR
-><TD
-WIDTH="20%"
-ALIGN="RIGHT"
-VALIGN="TOP"
-><TT
-CLASS="PARAMETER"
-><I
->len</I
-></TT
->&nbsp;:</TD
-><TD
-WIDTH="80%"
-ALIGN="LEFT"
-VALIGN="TOP"
->&nbsp;</TD
+>  an xmlBuffer for the input</TD
 ></TR
 ><TR
 ><TD
@@ -861,7 +1423,10 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>the number of byte written if success, or 
+-1 general error
+-2 if the transcoding fails (for *in is not valid utf8 string or
+the result of transformation can't fit into the encoding we want), or</TD
 ></TR
 ></TABLE
 ><P
@@ -871,13 +1436,13 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11109"
+NAME="AEN14181"
 ></A
 ><H3
 ><A
-NAME="XMLPARSECHARENCODING"
+NAME="XMLCHARENCINFUNC"
 ></A
->xmlParseCharEncoding ()</H3
+>xmlCharEncInFunc ()</H3
 ><TABLE
 BORDER="0"
 BGCOLOR="#D6E8FF"
@@ -887,17 +1452,23 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
-><A
-HREF="gnome-xml-encoding.html#XMLCHARENCODING"
->xmlCharEncoding</A
-> xmlParseCharEncoding        (const char *name);</PRE
+>int         xmlCharEncInFunc                (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);</PRE
 ></TD
 ></TR
 ></TABLE
 ><P
->Conpare the string to the known encoding schemes already known. Note
-that the comparison is case insensitive accordingly to the section
-[XML] 4.3.3 Character Encoding in Entities.</P
+>Generic front-end for the encoding handler input function</P
 ><P
 ></P
 ><DIV
@@ -919,14 +1490,48 @@
 ><TT
 CLASS="PARAMETER"
 ><I
->name</I
+>handler</I
 ></TT
 >&nbsp;:</TD
 ><TD
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>	char enconding transformation data structure</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>out</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  an xmlBuffer for the output.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>in</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  an xmlBuffer for the input</TD
 ></TR
 ><TR
 ><TD
@@ -941,7 +1546,10 @@
 WIDTH="80%"
 ALIGN="LEFT"
 VALIGN="TOP"
->&nbsp;</TD
+>the number of byte written if success, or 
+-1 general error
+-2 if the transcoding fails (for *in is not valid utf8 string or
+the result of transformation can't fit into the encoding we want), or</TD
 ></TR
 ></TABLE
 ><P
@@ -951,13 +1559,13 @@
 ><HR><DIV
 CLASS="REFSECT2"
 ><A
-NAME="AEN11129"
+NAME="AEN14211"
 ></A
 ><H3
 ><A
-NAME="XMLINITCHARENCODINGHANDLERS"
+NAME="XMLCHARENCFIRSTLINE"
 ></A
->xmlInitCharEncodingHandlers ()</H3
+>xmlCharEncFirstLine ()</H3
 ><TABLE
 BORDER="0"
 BGCOLOR="#D6E8FF"
@@ -967,17 +1575,188 @@
 ><TD
 ><PRE
 CLASS="PROGRAMLISTING"
->void        xmlInitCharEncodingHandlers     (void);</PRE
+>int         xmlCharEncFirstLine             (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> out,
+                                             <A
+HREF="gnome-xml-tree.html#XMLBUFFERPTR"
+>xmlBufferPtr</A
+> in);</PRE
 ></TD
 ></TR
 ></TABLE
 ><P
->Initialize the char encoding support, it registers the default
-encoding supported.
-NOTE: while public theis function usually don't need to be called
-in normal processing.</P
+>Front-end for the encoding handler input function, but handle only
+the very first line, i.e. limit itself to 45 chars.</P
 ><P
 ></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>handler</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>	char enconding transformation data structure</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>out</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  an xmlBuffer for the output.</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>in</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>  an xmlBuffer for the input</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>the number of byte written if success, or 
+-1 general error
+-2 if the transcoding fails (for *in is not valid utf8 string or
+the result of transformation can't fit into the encoding we want), or</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
+></DIV
+><HR><DIV
+CLASS="REFSECT2"
+><A
+NAME="AEN14241"
+></A
+><H3
+><A
+NAME="XMLCHARENCCLOSEFUNC"
+></A
+>xmlCharEncCloseFunc ()</H3
+><TABLE
+BORDER="0"
+BGCOLOR="#D6E8FF"
+WIDTH="100%"
+CELLPADDING="6"
+><TR
+><TD
+><PRE
+CLASS="PROGRAMLISTING"
+>int         xmlCharEncCloseFunc             (<A
+HREF="gnome-xml-encoding.html#XMLCHARENCODINGHANDLER"
+>xmlCharEncodingHandler</A
+> *handler);</PRE
+></TD
+></TR
+></TABLE
+><P
+>Generic front-end for hencoding handler close function</P
+><P
+></P
+><DIV
+CLASS="INFORMALTABLE"
+><P
+></P
+><TABLE
+BORDER="0"
+WIDTH="100%"
+BGCOLOR="#FFD0D0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><TT
+CLASS="PARAMETER"
+><I
+>handler</I
+></TT
+>&nbsp;:</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>	char enconding transformation data structure</TD
+></TR
+><TR
+><TD
+WIDTH="20%"
+ALIGN="RIGHT"
+VALIGN="TOP"
+><I
+CLASS="EMPHASIS"
+>Returns</I
+> :</TD
+><TD
+WIDTH="80%"
+ALIGN="LEFT"
+VALIGN="TOP"
+>0 if success, or -1 in case of error</TD
+></TR
+></TABLE
+><P
+></P
+></DIV
 ></DIV
 ></DIV
 ><DIV