python3-debian fails to load utf-8 changelog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-debian (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Attempting to load a changelog containing non-ascii utf-8 characters using the changlog module python3-debian in ubuntu vivid (version 0.1.22ubuntu1 of python3-debian) fails.
root@debian:/# zcat /usr/share/
root@debian:/# file testchangelog
testchangelog: UTF-8 Unicode text
root@debian:/# python3
Python 3.4.3 (default, Mar 26 2015, 22:03:40)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from debian import changelog
>>> f=open(
>>> c=changelog.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
strict=strict)
File "/usr/lib/
for line in file:
File "/usr/lib/
return codecs.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 822: ordinal not in range(128)
>>>
According to the sourcecode the default encoding for the changelog module is supposed to be utf-8 but it looks like that never actually gets passed to whatever does the decoding.
Performing the same test in a Debian sid chroot succeeds
Performing the same test with python 2 succeeds