Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ftfy/badness.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
|
[{box}] [{kaomoji}]
|
[{lower_accented}{upper_accented}{currency}{numeric}{start_punctuation}{end_punctuation}{law}] [{box}]
[{lower_accented}{upper_accented}{lower_common}{upper_common}{currency}{numeric}{start_punctuation}{end_punctuation}{law}] [{box}]
|
[{box}] [{end_punctuation}]
|
Expand Down
1 change: 1 addition & 0 deletions ftfy/chardata.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"iso-8859-2",
"macroman",
"cp437",
"koi8-r",
]

SINGLE_QUOTE_RE = re.compile("[\u02bc\u2018-\u201b]")
Expand Down
7 changes: 7 additions & 0 deletions tests/test-cases/in-the-wild.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,5 +447,12 @@
"fixed-encoding": "Ningbo,China",
"fixed": "Ningbo,China",
"expect": "pass"
},
{
"label": "Russian text in KOI8-R mojibake",
"comment": "issue #231. Reported as CP437/CP866, but it is KOI8-R: 0xD0 and 0xD1 decode to 'п' and 'я', which are the UTF-8 lead bytes of Cyrillic.",
"original": "п∙я│п╩п╦ п▓я▀ п╫п╣ я▐п╡п╩я▐п╣я┌п╣я│я▄ п╟п╢я─п╣я│п╟я┌п╬п╪",
"fixed": "Если Вы не являетесь адресатом",
"expect": "pass"
}
]