Skip to content

Commit

Permalink
Fix cp859 codepage
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Mar 4, 2024
1 parent 1116917 commit 4d4c10c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions alternative_encodings/cp859.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# Decoding Table

decoding_table = (
"\x00\x01\x03\x04ẴẪ\x07\x08\t\n\x0b\x0c\r\x0e\x0f"
"\x10\x11\x12\x13\x15\x16\x17\x18\x1a\x1b\x1c\x1d\x1f"
"\x00☺☻♥♦♣♠●◘○◙♂♀♪♫☼"
"▶◀↕‼¶§▬↨↑↓→←∟↔▲▼"
" !\"#$%&'()*+,-./"
"0123456789:;<=>?"
"@ABCDEFGHIJKLMNO"
Expand All @@ -26,7 +26,7 @@
"└┴┬├─┼ãÃ╚╔╩╦╠═╬¤"
"ðÐÊËÈ€ÍÎÏ┘┌█▄ŠÌ▀"
"ÓßÔÒõÕµþÞÚÛÙýݯŽ"
" ± Ÿ¶§÷ž°š·¹³²■\xa0"
"\xad±\xf2Ÿ¶§÷ž°š·¹³²■\xa0"
)

# Encoding table
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "alternative-encodings"
version = "0.2.1"
version = "0.2.2"
description = ""
authors = ["insolor <[email protected]>"]
license = "MIT"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_cp859.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def register_codec_fixture():
)

encoded = (
b"J'aime l'id\x82e que le plus grand des Sex-symbols new-yorkais, "
b"n'\x82tait qu'un chien dans un foyer de Brazzaville"
b"J'aime l'id\x82e que le plus grand des Sex-symbols "
b"new-yorkais, n'\x82tait qu'un chien dans un foyer d"
b"e Brazzaville"
)


Expand Down
6 changes: 2 additions & 4 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@


class CodecModule(Protocol):
def register():
...
def register(): ...

def unregister():
...
def unregister(): ...


@contextlib.contextmanager
Expand Down

0 comments on commit 4d4c10c

Please sign in to comment.