From 8d384f7cfcb9a6f1692c81c703c0d9e636683e13 Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 10 Dec 2014 02:10:16 +0100 Subject: tiff: Use TIFFOpenW on windows Taken from evince commit: 019c902c1e873aa465e877ae700f36eb94d04c45 From: Hib Eris Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=644928 --- backend/tiff/tiff-document.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'backend') diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index 9c113b49..cb4ebada 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -95,7 +95,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; -- cgit v1.2.1