]> www.fi.muni.cz Git - evince.git/commitdiff
Bug 644928 – Use TIFFOpenW on windows
authorHib Eris <hib@hiberis.nl>
Sat, 19 Mar 2011 17:21:06 +0000 (18:21 +0100)
committerWouter Bolsterlee <wbolster@gnome.org>
Sat, 19 Mar 2011 17:21:06 +0000 (18:21 +0100)
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;