diff --git a/glib/gfileutils.c b/glib/gfileutils.c
old mode 100644
new mode 100755
index 47de1b5..eb4eb08
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -327,14 +327,22 @@ g_file_test (const gchar *filename,
 #    define FILE_ATTRIBUTE_DEVICE 64
 #  endif
   int attributes;
-  wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
-
-  if (wfilename == NULL)
-    return FALSE;
-
-  attributes = GetFileAttributesW (wfilename);
-
-  g_free (wfilename);
+
+  if (test & G_FILE_TEST_ASCII_NAME)
+    {
+      attributes = GetFileAttributesA (filename);
+    }
+  else
+    {
+      wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
+
+      if (wfilename == NULL)
+        return FALSE;
+
+      attributes = GetFileAttributesW (wfilename);
+
+      g_free (wfilename);
+    }
 
   if (attributes == INVALID_FILE_ATTRIBUTES)
     return FALSE;
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
old mode 100644
new mode 100755
index 17b2acb..136d958
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -70,7 +70,8 @@ typedef enum
   G_FILE_TEST_IS_SYMLINK    = 1 << 1,
   G_FILE_TEST_IS_DIR        = 1 << 2,
   G_FILE_TEST_IS_EXECUTABLE = 1 << 3,
-  G_FILE_TEST_EXISTS        = 1 << 4
+  G_FILE_TEST_EXISTS        = 1 << 4,
+  G_FILE_TEST_ASCII_NAME    = 1 << 5
 } GFileTest;
 
 GQuark     g_file_error_quark      (void);
