diff options
author | Daniel Veillard <veillard@src.gnome.org> | 1999-08-10 19:04:08 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 1999-08-10 19:04:08 +0000 |
commit | b05deb7f5fa01da1cbc54f65199eff1c5421ec00 (patch) | |
tree | 88b82954fb85467ffd1ddad2d7dcaba7349bc32d /encoding.c | |
parent | 6a6ccc1de6c19ff3c77c10491d5f8b65759cff4a (diff) | |
download | android_external_libxml2-b05deb7f5fa01da1cbc54f65199eff1c5421ec00.tar.gz android_external_libxml2-b05deb7f5fa01da1cbc54f65199eff1c5421ec00.tar.bz2 android_external_libxml2-b05deb7f5fa01da1cbc54f65199eff1c5421ec00.zip |
Huge commit: 1.5.0, XML validation, Xpath, bugfixes, examples .... Daniel
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -23,7 +23,13 @@ #include <string.h> #include <stdio.h> #include "encoding.h" +#ifdef HAVE_UNICODE_H +#include <unicode.h> +#endif +#ifdef HAVE_UNICODE_H + +#else /* ! HAVE_UNICODE_H */ /* * From rfc2044: encoding of the Unicode values on UTF-8: * @@ -206,6 +212,7 @@ UTF8ToUTF16(unsigned short* out, int outlen, unsigned char* in, int inlen) return out-outstart; } +#endif /* ! HAVE_UNICODE_H */ /** * xmlDetectCharEncoding: @@ -407,8 +414,11 @@ xmlInitCharEncodingHandlers(void) { return; } xmlNewCharEncodingHandler("UTF-8", NULL, NULL); +#ifdef HAVE_UNICODE_H +#else xmlNewCharEncodingHandler("UTF-16", UTF16ToUTF8, UTF8ToUTF16); xmlNewCharEncodingHandler("ISO-8859-1", isolat1ToUTF8, UTF8Toisolat1); +#endif } /** |