Description of problem: As part of my on-going quest to build the books from the openstack-manuals project with publican I ran into this warning: WARNING: Image missing: tmp/en-US/xml/images/Login-โ-OpenStack-Dashboard.png On inspection of en-US/images in my source I found that there is in fact an image that matches that filename and that is the filename used in the XML source when including the image. Actual results: When I poked into the tmp directory though I can see that the post-copy filename is: tmp/en-US/xml/images/Login-รข??-OpenStack-Dashboard.png Obviously this doesn't match the filename the XML refers to and hence the warning appears. Expected results: Names of images in the tmp directory should match those from the source, even when they include unicode characters.
[Users_Guide]$ cp en-US/images/drupal_book.png en-US/images/Login-โ-OpenStack-Dashboard.png [Users_Guide]$ publican build --formats xml ... [Users_Guide]$ ls build/en-US/xml/images/L* build/en-US/xml/images/Login-โ-OpenStack-Dashboard.png Build works for me, but publish does not. [Users_Guide]$ publican build --formats html --publish ... [Users_Guide]$ ls publish/en-US/Publican/3.1/html/Users_Guide/images/L* publish/en-US/Publican/3.1/html/Users_Guide/images/Login-รข??-OpenStack-Dashboard.png
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
$ publican clean $ publican build --formats html --publish ... $ ls build/en-US/xml/images/L*; ls build/en-US/html/images/L*; ls publish/en-US/Publican/3.1/html/Users_Guide/images/L*; build/en-US/xml/images/Login-โ-OpenStack-Dashboard.png build/en-US/html/images/Login-โ-OpenStack-Dashboard.png publish/en-US/Publican/3.1/html/Users_Guide/images/Login-โ-OpenStack-Dashboard.png To ssh://git.fedorahosted.org/git/publican.git 783564d..d45cab3 HEAD -> devel
This failed on my attempt: $ rpm -q publican publican-3.1.5-0.fc19.t62.noarch $ publican clean $ publican build --langs en-US --formats html-single Setting up en-US Processing file tmp/en-US/xml/Common_Content/Conventions.xml -> tmp/en-US/xml/Common_Content/Conventions.xml Processing file tmp/en-US/xml/Common_Content/Feedback.xml -> tmp/en-US/xml/Common_Content/Feedback.xml Processing file tmp/en-US/xml/Common_Content/Legal_Notice.xml -> tmp/en-US/xml/Common_Content/Legal_Notice.xml Processing file tmp/en-US/xml/Common_Content/Program_Listing.xml -> tmp/en-US/xml/Common_Content/Program_Listing.xml Processing file tmp/en-US/xml/Common_Content/Revision_History.xml -> tmp/en-US/xml/Common_Content/Revision_History.xml Processing file tmp/en-US/xml_tmp/Author_Group.xml -> tmp/en-US/xml/Author_Group.xml Processing file tmp/en-US/xml_tmp/Book_Info.xml -> tmp/en-US/xml/Book_Info.xml Processing file tmp/en-US/xml_tmp/Chapter.xml -> tmp/en-US/xml/Chapter.xml WARNING: Image missing: tmp/en-US/xml/images/Login-โ-OpenStack-Dashboard.png Processing file tmp/en-US/xml_tmp/Preface.xml -> tmp/en-US/xml/Preface.xml Processing file tmp/en-US/xml_tmp/Revision_History.xml -> tmp/en-US/xml/Revision_History.xml Processing file tmp/en-US/xml_tmp/Test_3.2.xml -> tmp/en-US/xml/Test_3.2.xml Beginning work on en-US DTD Validation OK Starting html-single Using XML::LibXSLT on /usr/share/publican/xsl/html-single.xsl Finished html-single $ ls tmp/en-US/html-single/images/ icon.svg Login-รข??-OpenStack-Dashboard.png Same result with "publican build --formats html --publish"
This is definitely working for me on RHEL6. $ publican clean $ cp en-US/images/cover_thumbnail.png en-US/images/Login-โ-OpenStack-Dashboard.png $ publican build --formats html --publish ... $ ls build/en-US/xml/images/L*; ls build/en-US/html/images/L*; ls publish/en-US/Publican/3.2/html/Users_Guide/images/L*; build/en-US/xml/images/Login-โ-OpenStack-Dashboard.png build/en-US/html/images/Login-โ-OpenStack-Dashboard.png publish/en-US/Publican/3.2/html/Users_Guide/images/Login-โ-OpenStack-Dashboard.png $ echo $LANG en_US.utf8
Hey Jeff, Tomas asked me to test this as well and I can confirm that it still doesn't work - at least not on Fedora (17). And I get the same error whether publishing or just building into tmp/. $ rpm -q publican publican-3.1.5-0.fc17.t65.noarch $ echo $LANG en_US.utf8 $ ls en-US/images/L* -rw-rw-r--. 1 pbokoc pbokoc 27577 Jul 15 15:56 en-US/images/Login-โ-OpenStack-Dashboard.jpg $ publican clean $ publican build --publish --langs=en-US --formats=html Setting up en-US ...snip... WARNING: Image missing: tmp/en-US/xml/images/Login-โ-OpenStack-Dashboard.jpg ...snip... $ ls publish/en-US/Documentation/0.1/html/Test_Book/images/L* -rw-rw-r--. 1 pbokoc pbokoc 27577 Jul 24 13:54 publish/en-US/Documentation/0.1/html/Test_Book/images/Login-รข??-OpenStack-Dashboard.png.jpg
I think I found where the problem is. Jeff, you've been testing this by simply renaming an image. For this bug to manifest, you need to actually use the renamed image in the book. If you just rename the file and don't change anything else, everything works, because (I'm assuming) the file just gets copied from images/ to publish/en-US/images. If the image is used in the book with this filename, that's where the problem happens.
Ah, disregard the last comment, I rechecked again and it still happens every time even if the image isn't used in the book. I must have been seeing things.
I wrote wrapper functions for the downstream module to ensure utf8 is always set. Should definitely work now on all platforms. To ssh://git.fedorahosted.org/git/publican.git 42bfa0d..2fbf002 devel -> devel
Verified in publican-3.1.5-0.fc19.t72.noarch with perl-Archive-Tar-1.90-3.fc19.noarch
The fix for this bug has been shipped in publican 3.2.0