Another Minor Bug Fixed (AsciiDoc3-3.0.3)

Published: 2019-02-01

When you try to generate a "slidy" html page (backend slidy) on Windows systems

C:\Users\username\userdirectory\doc> py -3 ..\ -a toc -a icons -n -v --b slidy test.txt

you may encounter an error:

asciidoc3: FAILED: unexpected error:
Traceback (most recent call last):
  File "..\", line 6136, in asciidoc3
    conffile = config.load_backend()
  File "..\", line 4713, in <listcomp>
    s.rstrip() for s in f]
  File "C:\Program Files (x86)\Python37-32\lib\encodings\", line 23, in
 decode return codecs.charmap_decode(input,self.errors,decoding_table)[0]
 UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 2587: character maps to <undefined>

The reason is found in slidy.js section i18n.

// for each language define an associative array
// and also the help text which is longer

var w3c_slidy_i18n = {
  strings_es: {

It’s related to this issue. We have a few second UTF-8 bytes (0x81, 0x8D, 0x8F, 0x90, 0x9D) in the help texts es, ca, ja, zh, and ru. I replaced or deleted the crucial characters - you’ll see a few new ???, because I speak not any of these languages.

As mentioned before, this appears only on Windows systems (of course, charmap).
The tarball asciidoc3-3.0.3.tar.gz, the zip-file (here), and the repo are already updated.