Summary: | app-text/asciidoc-8.6.10_p20181016 when compiling net-firewall/nftables-0.9.3-r1::gentoo -- UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5796: ordinal not in range(128) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gary E. Miller <gem> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | base-system, gem, jstein, Klaus+gentoo, klondike, prometheanfire, proxy-maint, reagentoo, shimarin, tvorup |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/asciidoc/asciidoc-py3/issues/92 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build log |
Description
Gary E. Miller
2020-01-10 18:57:43 UTC
Created attachment 602928 [details]
build log
build log
*** Bug 705158 has been marked as a duplicate of this bug. *** I could reproduce this error after upgrading to the new asciidoc version using python3.6 instead of python2.7 This is a bug in app-text/asciidoc combined by a second bug introduced by python2.7 being removed (and therefore no longer being default) on 5 of January by commit cd3f25deb13cf4d6c9d721d515dbf772a988426f Changing line 336 and following by the following, correct python code does solve the issue. I'm reassigning this to the asciidoc maintainers as we can't junt remove the © from the bottom of the document. with open(asciidoc_file, 'rb') as f: for line in f: mo = re.search(b'^//\s*a2x:', line) if mo: options += ' ' + line[mo.end():].strip().decode('ascii') (In reply to Francisco Blas Izquierdo Riera from comment #4) > This is a bug in app-text/asciidoc combined by a second bug introduced by > python2.7 being removed (and therefore no longer being default) on 5 of > January by commit cd3f25deb13cf4d6c9d721d515dbf772a988426f > > Changing line 336 and following by the following, correct python code does > solve the issue. I'm reassigning this to the asciidoc maintainers as we > can't junt remove the © from the bottom of the document. > > with open(asciidoc_file, 'rb') as f: > for line in f: > mo = re.search(b'^//\s*a2x:', line) > if mo: > options += ' ' + line[mo.end():].strip().decode('ascii') Sorry for the delay, I was sick for the last three days. If you could provide me with a proper unified diff for your POC with version information (latest git? the version in portage?), then I can use that in my upstream bug report. FWIW, I have not been able to reproduce this (by trying the command line by itself on the downloaded "nft.txt" or by installing via portage), but then I also don't set LC_ALL="C". Is that actually supported? My understanding was that using LC_ALL at all is discouraged (ah, yes, I see that the localization guide at https://wiki.gentoo.org/wiki/Localization/Guide says so). Now glimpsing at the documentation to "open()" in Python I tend to agree with you that Asciidoc should not be (indirectly) relying on the locale being correct and should either pass an encoding to open() (after all, Asciidoc assumes UTF-8 documents unless overridden by an ":encoding:" attribute in the document header, see http://asciidoc.org/userguide.html#_gotchas) or (as you suggested) open the file as binary. So while I consider it an Asciidoc bug, the LC_ALL="C" irritates me somewhat (if you don't know what I mean, look at the emerge --info output from OP). What do you think? Alright, I opened a bug upstream, see https://github.com/asciidoc/asciidoc-py3/issues/92. |