diff options
author | Mike Hommey <glandium@debian.org> | 2007-04-17 20:40:00 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2007-04-17 20:40:00 +0200 |
commit | 789259a1b6850d30acffbb62b11456b9ed7a8f59 (patch) | |
tree | 842f2f9042a4264898ec29078aa029640078c393 /xmlIO.c | |
parent | 968041a8b2ec86c39b5074024ce97d136ecd9a95 (diff) | |
download | libxml2-789259a1b6850d30acffbb62b11456b9ed7a8f59.tar.gz |
Load /tmp/libxml2-2.6.28 intoupstream/2.6.28.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'xmlIO.c')
-rw-r--r-- | xmlIO.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -36,10 +36,14 @@ #include <zlib.h> #endif -#ifdef WIN32 +#if defined(WIN32) || defined(_WIN32) #include <windows.h> #endif +#if defined(_WIN32_WCE) +#include <winnls.h> /* for CP_UTF8 */ +#endif + /* Figure a portable way to know if a file is a directory. */ #ifndef HAVE_STAT # ifdef HAVE__STAT @@ -883,13 +887,15 @@ xmlFileOpen (const char *filename) { char *unescaped; void *retval; - unescaped = xmlURIUnescapeString(filename, 0, NULL); - if (unescaped != NULL) { - retval = xmlFileOpen_real(unescaped); - xmlFree(unescaped); - } else { - retval = xmlFileOpen_real(filename); + retval = xmlFileOpen_real(filename); + if (retval == NULL) { + unescaped = xmlURIUnescapeString(filename, 0, NULL); + if (unescaped != NULL) { + retval = xmlFileOpen_real(unescaped); + xmlFree(unescaped); + } } + return retval; } |