character-encoding-utils 0.0.7__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/PKG-INFO +1 -1
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/pyproject.toml +1 -1
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/src/character_encoding_utils/big5.py +8 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/src/character_encoding_utils/gb2312.py +8 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/src/character_encoding_utils/ksx1001.py +8 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/src/character_encoding_utils/shiftjis.py +8 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/.github/workflows/publish.yml +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/.github/workflows/test.yml +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/.gitignore +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/LICENSE +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/README.md +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/requirements.txt +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/src/character_encoding_utils/__init__.py +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/tests/test_big5.py +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/tests/test_gb2312.py +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/tests/test_ksx1001.py +0 -0
- {character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/tests/test_shiftjis.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: character-encoding-utils
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Some character encoding utils.
|
|
5
5
|
Project-URL: homepage, https://github.com/TakWolf/character-encoding-utils
|
|
6
6
|
Project-URL: source, https://github.com/TakWolf/character-encoding-utils
|
|
@@ -4,6 +4,10 @@ class Big5Exception(Exception):
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class Big5EncodeError(Big5Exception):
|
|
7
|
+
object: str
|
|
8
|
+
position: int
|
|
9
|
+
reason: str
|
|
10
|
+
|
|
7
11
|
def __init__(self, obj: str, position: int, reason: str):
|
|
8
12
|
super().__init__(f"'big5' codec can't encode character '\\u{ord(obj):x}' in position {position}: {reason}")
|
|
9
13
|
self.object = obj
|
|
@@ -12,6 +16,10 @@ class Big5EncodeError(Big5Exception):
|
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
class Big5DecodeError(Big5Exception):
|
|
19
|
+
object: bytes
|
|
20
|
+
position: int
|
|
21
|
+
reason: str
|
|
22
|
+
|
|
15
23
|
def __init__(self, obj: bytes, position: int, reason: str):
|
|
16
24
|
if len(obj) <= 1:
|
|
17
25
|
super().__init__(f"'big5' codec can't decode byte 0x{obj[0]:x} in position {position}: {reason}")
|
|
@@ -7,6 +7,10 @@ class GB2312Exception(Exception):
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class GB2312EncodeError(GB2312Exception):
|
|
10
|
+
object: str
|
|
11
|
+
position: int
|
|
12
|
+
reason: str
|
|
13
|
+
|
|
10
14
|
def __init__(self, obj: str, position: int, reason: str):
|
|
11
15
|
super().__init__(f"'gb2312' codec can't encode character '\\u{ord(obj):x}' in position {position}: {reason}")
|
|
12
16
|
self.object = obj
|
|
@@ -15,6 +19,10 @@ class GB2312EncodeError(GB2312Exception):
|
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
class GB2312DecodeError(GB2312Exception):
|
|
22
|
+
object: bytes
|
|
23
|
+
position: int
|
|
24
|
+
reason: str
|
|
25
|
+
|
|
18
26
|
def __init__(self, obj: bytes, position: int, reason: str):
|
|
19
27
|
if len(obj) <= 1:
|
|
20
28
|
super().__init__(f"'gb2312' codec can't decode byte 0x{obj[0]:x} in position {position}: {reason}")
|
|
@@ -7,6 +7,10 @@ class KSX1001Exception(Exception):
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class KSX1001EncodeError(KSX1001Exception):
|
|
10
|
+
object: str
|
|
11
|
+
position: int
|
|
12
|
+
reason: str
|
|
13
|
+
|
|
10
14
|
def __init__(self, obj: str, position: int, reason: str):
|
|
11
15
|
super().__init__(f"'ksx1001' codec can't encode character '\\u{ord(obj):x}' in position {position}: {reason}")
|
|
12
16
|
self.object = obj
|
|
@@ -15,6 +19,10 @@ class KSX1001EncodeError(KSX1001Exception):
|
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
class KSX1001DecodeError(KSX1001Exception):
|
|
22
|
+
object: bytes
|
|
23
|
+
position: int
|
|
24
|
+
reason: str
|
|
25
|
+
|
|
18
26
|
def __init__(self, obj: bytes, position: int, reason: str):
|
|
19
27
|
if len(obj) <= 1:
|
|
20
28
|
super().__init__(f"'ksx1001' codec can't decode byte 0x{obj[0]:x} in position {position}: {reason}")
|
|
@@ -6,6 +6,10 @@ class ShiftJISException(Exception):
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class ShiftJISEncodeError(ShiftJISException):
|
|
9
|
+
object: str
|
|
10
|
+
position: int
|
|
11
|
+
reason: str
|
|
12
|
+
|
|
9
13
|
def __init__(self, obj: str, position: int, reason: str):
|
|
10
14
|
super().__init__(f"'shift-jis' codec can't encode character '\\u{ord(obj):x}' in position {position}: {reason}")
|
|
11
15
|
self.object = obj
|
|
@@ -14,6 +18,10 @@ class ShiftJISEncodeError(ShiftJISException):
|
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
class ShiftJISDecodeError(ShiftJISException):
|
|
21
|
+
object: bytes
|
|
22
|
+
position: int
|
|
23
|
+
reason: str
|
|
24
|
+
|
|
17
25
|
def __init__(self, obj: bytes, position: int, reason: str):
|
|
18
26
|
if len(obj) <= 1:
|
|
19
27
|
super().__init__(f"'shift-jis' codec can't decode byte 0x{obj[0]:x} in position {position}: {reason}")
|
{character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/.github/workflows/publish.yml
RENAMED
|
File without changes
|
{character_encoding_utils-0.0.7 → character_encoding_utils-0.0.8}/.github/workflows/test.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|