Error when running from a directory with a non-ASCII name
Status: Beta
Brought to you by:
marsgui
I ran dblatex via a2x from asciidoc, and it failed if the directory containing the asciidoc file had non-ASCII characters in its name.
For example, this worked:
$ mkdir Documents
$ cd Documents/
$ cp /usr/share/doc/asciidoc/BUGS.adoc .
$ a2x -f pdf -d article BUGS.adoc
But this failed:
$ mkdir 文件
$ cd 文件
$ cp /usr/share/doc/asciidoc/BUGS.adoc .
$ a2x -f pdf -d article BUGS.adoc
a2x: ERROR: "dblatex" -t pdf -p "/usr/lib/python3.12/site-packages/asciidoc/resources/dblatex/asciidoc-dblatex.xsl" -s "/usr/lib/python3.12/site-packages/asciidoc/resources/dblatex/asciidoc-dblatex.sty" "/path/to/文件/BUGS.xml" returned non-zero exit status 1
Running a2x with -v showed the dblatex error message:
Error: 'latin-1' codec can't encode characters in position 39-40: ordinal not in range(256)