GNOME Bugzilla – Bug 761161
DjVu backend: support utf-8 filenames on Mac OS X (with patch)
Last modified: 2018-01-20 13:49:50 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.
Created attachment 319806 [details] [review] patch
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.
Since 3.5.22 was released in 2009, perhaps a version bump in configure.ac is the most appropriate course of action here?
(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.
Created attachment 320126 [details] [review] patch v2 Patch updated with configure.ac changes
Comment on attachment 320126 [details] [review] patch v2 Pushed, thank you
Patch was pushed, and I don't see anything else to be done in this bug, so closing.