summaryrefslogtreecommitdiff
path: root/xmlIO.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2007-04-17 20:40:00 +0200
committerMike Hommey <glandium@debian.org>2007-04-17 20:40:00 +0200
commit789259a1b6850d30acffbb62b11456b9ed7a8f59 (patch)
tree842f2f9042a4264898ec29078aa029640078c393 /xmlIO.c
parent968041a8b2ec86c39b5074024ce97d136ecd9a95 (diff)
downloadlibxml2-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.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/xmlIO.c b/xmlIO.c
index 90db848..f576d76 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -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;
}