revamped the encoding support, added iconv support, so now libxml if


* encoding.[ch], xmlIO.[ch], parser.c, configure.in : revamped
  the encoding support, added iconv support, so now libxml if
  compiled with iconv automatically support japanese encodings
  among others. Work based on initial patch from Yuan-Chen Cheng
  I may have broken binary compat in the encoding handler
  registration scheme, but that was so utterly broken I don't
  expect anybody to have used this feature until now.
* parserInternals.h: fixup on the CHAR range macro
* xml-error.h, parser.c: catch URL/URI errors using the uri.c
  code.
* tree.[ch]: added xmlBufferGrow(), was needed for iconv
* uri.c: added xmlParseURI() I can't believe I forgot to
  implement this one in 2.0 !!!
* SAX.c: moved doc->encoding update in the endDocument() call.
* TODO: updated.

  Iconv rules :-)

Daniel
diff --git a/uri.c b/uri.c
index 1a48113..6000d39 100644
--- a/uri.c
+++ b/uri.c
@@ -1284,6 +1284,34 @@
 }
 
 /**
+ * xmlParseURI:
+ * @str:  the URI string to analyze
+ *
+ * Parse an URI 
+ * 
+ * URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
+ *
+ * Returns a newly build xmlURIPtr or NULL in case of error
+ */
+xmlURIPtr
+xmlParseURI(const char *str) {
+    xmlURIPtr uri;
+    int ret;
+
+    if (str == NULL)
+	return(NULL);
+    uri = xmlCreateURI();
+    if (uri != NULL) {
+	ret = xmlParseURIReference(uri, str);
+        if (ret) {
+	    xmlFreeURI(uri);
+	    return(NULL);
+	}
+    }
+    return(uri);
+}
+
+/**
  * xmlNormalizeURIPath:
  * @path:  pointer to the path string
  *