]> www.fi.muni.cz Git - evince.git/blobdiff - backend/tiff/tiff-document.c
Bug 644928 – Use TIFFOpenW on windows
[evince.git] / backend / tiff / tiff-document.c
index 1be2aecebfec467f99334b09236031d8bd97ff50..c310b34ae1646ae1a3a83153e31af1d192df6239 100644 (file)
@@ -91,7 +91,21 @@ tiff_document_load (EvDocument  *document,
                return FALSE;
        
        push_handlers ();
+
+#ifdef G_OS_WIN32
+{
+       wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, error);
+       if (wfilename == NULL) {
+               return FALSE;
+       }
+
+       tiff = TIFFOpenW (wfilename, "r");
+
+       g_free (wfilename);
+}
+#else
        tiff = TIFFOpen (filename, "r");
+#endif
        if (tiff) {
                guint32 w, h;