Description of problem: invoked slightly silly command (fop with epub): # a2x --icons --fop -fepub ams-readme.txt Version-Release number of selected component: asciidoc-8.6.8-1.fc18 Additional info: reporter: libreport-2.1.4 cmdline: python /usr/bin/a2x --icons --fop -fepub ams-readme.txt executable: /usr/bin/a2x kernel: 3.9.4-200.fc18.x86_64 runlevel: N 5 uid: 1000 Truncated backtrace: a2x:150:write_file:UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 292: ordinal not in range(128) Traceback (most recent call last): File "/usr/bin/a2x", line 958, in <module> a2x.execute() File "/usr/bin/a2x", line 378, in execute self.__getattribute__('to_'+self.format)() File "/usr/bin/a2x", line 780, in to_epub self.update_epub_manifest(opf_file) File "/usr/bin/a2x", line 758, in update_epub_manifest write_file(opf_file, opf.toxml()) File "/usr/bin/a2x", line 150, in write_file f.write(data) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 292: ordinal not in range(128) Local variables in innermost frame: filename: '/home/carik/ams-readme.epub.d/OEBPS/content.opf' data: u'<?xml version="1.0" ?>\n<package unique-identifier="articleid" version="2.0" xmlns="http://www.idpf.org/2007/opf"><metadata><dc:identifier id="articleid" xmlns:dc="http://purl.org/dc/elements/1.1/">_idm206730851600</dc:identifier><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Developer\u2019s guide to AS3953 GUI</dc:title><dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">May 2013</dc:date><dc:creator opf:file-as="Carik, Lubomir" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">Lubomir Carik</dc:creator><dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language></metadata><manifest><item href="toc.ncx" id="ncxtoc" media-type="application/x-dtbncx+xml"/><item href="docbook-xsl.css" id="css" media-type="text/css"/><item href="index.html" id="idm206730851600" media-type="application/xhtml+xml"/><item href="ar01s01.html" id="idm206730084192" media-type="application/xhtml+xml"/><item href="ar01s02.html" id="idm206727735072" media-type="application/xhtml+xml"/><item href="ar01s03.html" id="idm206730822544" media-type="application/xhtml+xml"/><item href="ar01s04.html" id="idm206730819328" media-type="application/xhtml+xml"/><item href="ar01s05.html" id="idm206730945552" media-type="application/xhtml+xml"/><item href="images/icons/important.png" id="a2x-1" media-type="image/png"/><item href="images/icons/tip.png" id="a2x-2" media-type="image/png"/><item href="images/icons/warning.png" id="a2x-3" media-type="image/png"/><item href="images/icons/caution.png" id="a2x-4" media-type="image/png"/><item href="images/icons/note.png" id="a2x-5" media-type="image/png"/></manifest><spine toc="ncxtoc"><itemref idref="idm206730851600"/><itemref idref="idm206730084192"/><itemref idref="idm206727735072"/><itemref idref="idm206730822544"/><itemref idref="idm206730819328"/><itemref idref="idm206730945552"/></spine></package>' mode: 'w' f: <closed file '/home/carik/ams-readme.epub.d/OEBPS/content.opf', mode 'w' at 0x1722540>
Created attachment 754332 [details] File: backtrace
Created attachment 754333 [details] File: core_backtrace
Created attachment 754334 [details] File: environ
Would it be possible to attach given ams-readme.txt file? It would certainly help with reproducing/fixing
Created attachment 756214 [details] sample file with unexpected character encoding Hi, I can't attach original (full file). But at least a sub-set of original file to reproduce the crash...
Thanks for reproducer. The problem is actually in the way a2x tries to modify epub manifest when using --icons (regardless of using --fop). I obviously doesn't handle encoding properly at all. I whipped up a patch really quickly just to verify a fix, but will need to clean it up before submitting upstream.
asciidoc-8.6.8-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/asciidoc-8.6.8-3.fc20
Package asciidoc-8.6.8-3.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing asciidoc-8.6.8-3.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-22724/asciidoc-8.6.8-3.fc20 then log in and leave karma (feedback).
asciidoc-8.6.8-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.