Hi Stefan,

Unfortunately this is a known bug in Python see http://bugs.python.org/issue3932

You must explicitly specify non-ascii encodings and a2x works around the bug.

Cheers
Lex

On 24 June 2011 00:40, Stefan Kost <[email protected]> wrote:
> Hi,
> I am getting the python backtrace below. My documents are valid UTF-8 as it
> seems. Any idea?
> Stefan
> $ a2x --version
> a2x 8.5.2
> Traceback (most recent call last):
>   File "/usr/bin/a2x", line 730, in <module>
>     a2x.execute()
>   File "/usr/bin/a2x", line 294, in execute
>     self.__getattribute__('to_'+self.format)()  # Execute to_* functions.
>   File "/usr/bin/a2x", line 493, in to_xhtml
>     self.copy_resources(xhtml_file, src_dir, self.destination_dir)
>   File "/usr/bin/a2x", line 443, in copy_resources
>     lambda attrs: attrs.get('type') == 'text/css')
>   File "/usr/bin/a2x", line 235, in find_resources
>     parser.feed(open(f).read())
>   File "/usr/lib/python2.6/HTMLParser.py", line 108, in feed
>     self.goahead(0)
>   File "/usr/lib/python2.6/HTMLParser.py", line 148, in goahead
>     k = self.parse_starttag(i)
>   File "/usr/lib/python2.6/HTMLParser.py", line 249, in parse_starttag
>     attrvalue = self.unescape(attrvalue)
>   File "/usr/lib/python2.6/HTMLParser.py", line 387, in unescape
>     return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities,
> s)
>   File "/usr/lib/python2.6/re.py", line 151, in sub
>     return _compile(pattern, 0).sub(repl, string, count)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 2:
> ordinal not in range(128)
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to