After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761161 - DjVu backend: support utf-8 filenames on Mac OS X (with patch)
DjVu backend: support utf-8 filenames on Mac OS X (with patch)
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: backends
3.18.x
Other Mac OS
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-27 07:09 UTC by Tom Schoonjans
Modified: 2018-01-20 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.15 KB, patch)
2016-01-27 07:09 UTC, Tom Schoonjans
none Details | Review
patch v2 (2.08 KB, patch)
2016-01-31 14:37 UTC, Tom Schoonjans
committed Details | Review

Description Tom Schoonjans 2016-01-27 07:09:05 UTC
When opening a DjVu file containing non-ASCII UTF-8 characters in its filename, the file refuses to open on Mac OS X and returns the error message: "DjVu document has incorrect format".

The origins of this bug lie in the fact that the HFS+ filesystem uses a UTF-8 filename encoding. This will cause ddjvu_document_create_by_filename to fail when using a filename that contains special characters. The solution I found consists of using ddjvu_document_create_by_filename_utf8 instead when building on Mac OS X through an appropriate conditional compilation macro.
Comment 1 Tom Schoonjans 2016-01-27 07:09:46 UTC
Created attachment 319806 [details] [review]
patch
Comment 2 Carlos Garcia Campos 2016-01-31 09:27:49 UTC
Review of attachment 319806 [details] [review]:

Thanks for the patch. It looks good to me, the only problem is that ddjvu_document_create_by_filename_utf8() was added to libdjvu in version 3.5.22 while we require 3.5.17. So we should either bump the minimum version to 3.5.22 in configure.ac or add another ifdef to check the DJVU api version, something like #if defined(__APPLE__) && DDJVUAPI_VERSION >= 19.
Comment 3 Tom Schoonjans 2016-01-31 10:53:03 UTC
Since 3.5.22 was released in 2009, perhaps a version bump in configure.ac is the most appropriate course of action here?
Comment 4 Carlos Garcia Campos 2016-01-31 11:37:16 UTC
(In reply to Tom Schoonjans from comment #3)
> Since 3.5.22 was released in 2009, perhaps a version bump in configure.ac is
> the most appropriate course of action here?

Ok.
Comment 5 Tom Schoonjans 2016-01-31 14:37:49 UTC
Created attachment 320126 [details] [review]
patch v2

Patch updated with configure.ac changes
Comment 6 Carlos Garcia Campos 2016-02-27 08:36:42 UTC
Comment on attachment 320126 [details] [review]
patch v2

Pushed, thank you
Comment 7 Bastien Nocera 2018-01-20 13:49:50 UTC
Patch was pushed, and I don't see anything else to be done in this bug, so closing.