diff options
author | infirit <[email protected]> | 2014-12-10 02:10:16 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-10 02:10:16 +0100 |
commit | 8d384f7cfcb9a6f1692c81c703c0d9e636683e13 (patch) | |
tree | 4c63cb636bb29836996854fb1e7e3c79b9bab62f | |
parent | 308782586222c4ba4ccc1585f6b0c636f521fddb (diff) | |
download | atril-8d384f7cfcb9a6f1692c81c703c0d9e636683e13.tar.bz2 atril-8d384f7cfcb9a6f1692c81c703c0d9e636683e13.tar.xz |
tiff: Use TIFFOpenW on windows
Taken from evince commit: 019c902c1e873aa465e877ae700f36eb94d04c45
From: Hib Eris <[email protected]>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=644928
-rw-r--r-- | backend/tiff/tiff-document.c | 14 |
1 files changed, 14 insertions, 0 deletions
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; |