Fix wrong encoding in changelog entries
Relates: https://pagure.io/koji/issue/3412
This commit is contained in:
parent
576d04eda8
commit
93bdd16724
1 changed files with 4 additions and 2 deletions
|
|
@ -3541,9 +3541,11 @@ if six.PY3:
|
|||
def removeNonprintable(value):
|
||||
# expects raw-encoded string, not unicode
|
||||
if six.PY2:
|
||||
return value.translate(None, NONPRINTABLE_CHARS)
|
||||
value = value.translate(None, NONPRINTABLE_CHARS)
|
||||
else:
|
||||
return value.translate(NONPRINTABLE_CHARS_TABLE)
|
||||
value = value.translate(NONPRINTABLE_CHARS_TABLE)
|
||||
# remove broken unicode chars (some changelogs, etc.)
|
||||
return value.encode('utf-8', errors='replace').decode()
|
||||
|
||||
|
||||
def _fix_print(value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue