extract-msg 0.48.2__py3-none-any.whl
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.
- extract_msg/__init__.py +71 -0
- extract_msg/__main__.py +115 -0
- extract_msg/_rtf/__init__.py +21 -0
- extract_msg/_rtf/create_doc.py +29 -0
- extract_msg/_rtf/inject_rtf.py +174 -0
- extract_msg/_rtf/token.py +35 -0
- extract_msg/_rtf/tokenize_rtf.py +253 -0
- extract_msg/attachments/__init__.py +144 -0
- extract_msg/attachments/attachment.py +188 -0
- extract_msg/attachments/attachment_base.py +730 -0
- extract_msg/attachments/broken_att.py +42 -0
- extract_msg/attachments/custom_att.py +173 -0
- extract_msg/attachments/custom_att_handler/__init__.py +80 -0
- extract_msg/attachments/custom_att_handler/custom_handler.py +134 -0
- extract_msg/attachments/custom_att_handler/lnk_obj_att.py +109 -0
- extract_msg/attachments/custom_att_handler/outlook_image_dib.py +141 -0
- extract_msg/attachments/emb_msg_att.py +134 -0
- extract_msg/attachments/signed_att.py +234 -0
- extract_msg/attachments/unsupported_att.py +40 -0
- extract_msg/attachments/web_att.py +74 -0
- extract_msg/constants/__init__.py +294 -0
- extract_msg/constants/ps.py +46 -0
- extract_msg/constants/re.py +42 -0
- extract_msg/constants/st.py +110 -0
- extract_msg/data/logging-config/logging-nt.json +64 -0
- extract_msg/data/logging-config/logging-posix.json +64 -0
- extract_msg/encoding/__init__.py +277 -0
- extract_msg/encoding/_dt/__init__.py +4 -0
- extract_msg/encoding/_dt/_mac_ce.py +8 -0
- extract_msg/encoding/_dt/_mac_cyrillic.py +8 -0
- extract_msg/encoding/_dt/_mac_greek.py +8 -0
- extract_msg/encoding/_dt/_mac_iceland.py +8 -0
- extract_msg/encoding/_dt/_mac_turkish.py +8 -0
- extract_msg/encoding/_dt/_win874_dec.py +8 -0
- extract_msg/encoding/_dt/_win950_dec.py +6 -0
- extract_msg/encoding/utils.py +329 -0
- extract_msg/enums.py +2067 -0
- extract_msg/exceptions.py +170 -0
- extract_msg/msg_classes/__init__.py +49 -0
- extract_msg/msg_classes/appointment.py +195 -0
- extract_msg/msg_classes/calendar.py +92 -0
- extract_msg/msg_classes/calendar_base.py +496 -0
- extract_msg/msg_classes/contact.py +1335 -0
- extract_msg/msg_classes/journal.py +131 -0
- extract_msg/msg_classes/meeting_cancellation.py +108 -0
- extract_msg/msg_classes/meeting_exception.py +55 -0
- extract_msg/msg_classes/meeting_forward.py +115 -0
- extract_msg/msg_classes/meeting_related.py +65 -0
- extract_msg/msg_classes/meeting_request.py +189 -0
- extract_msg/msg_classes/meeting_response.py +74 -0
- extract_msg/msg_classes/message.py +12 -0
- extract_msg/msg_classes/message_base.py +1382 -0
- extract_msg/msg_classes/message_signed.py +17 -0
- extract_msg/msg_classes/message_signed_base.py +168 -0
- extract_msg/msg_classes/msg.py +1172 -0
- extract_msg/msg_classes/post.py +53 -0
- extract_msg/msg_classes/sticky_note.py +67 -0
- extract_msg/msg_classes/task.py +363 -0
- extract_msg/msg_classes/task_request.py +86 -0
- extract_msg/null_date.py +34 -0
- extract_msg/ole_writer.py +1086 -0
- extract_msg/open_msg.py +204 -0
- extract_msg/properties/__init__.py +23 -0
- extract_msg/properties/named.py +481 -0
- extract_msg/properties/prop.py +506 -0
- extract_msg/properties/properties_store.py +476 -0
- extract_msg/py.typed +0 -0
- extract_msg/recipient.py +362 -0
- extract_msg/structures/__init__.py +34 -0
- extract_msg/structures/_helpers.py +345 -0
- extract_msg/structures/business_card.py +422 -0
- extract_msg/structures/cfoas.py +108 -0
- extract_msg/structures/contact_link_entry.py +51 -0
- extract_msg/structures/dev_mode_a.py +621 -0
- extract_msg/structures/dv_target_device.py +168 -0
- extract_msg/structures/entry_id.py +697 -0
- extract_msg/structures/misc_id.py +222 -0
- extract_msg/structures/mon_stream.py +55 -0
- extract_msg/structures/odt.py +74 -0
- extract_msg/structures/ole_pres.py +302 -0
- extract_msg/structures/ole_stream_struct.py +117 -0
- extract_msg/structures/recurrence_pattern.py +199 -0
- extract_msg/structures/report_tag.py +127 -0
- extract_msg/structures/system_time.py +158 -0
- extract_msg/structures/time_zone_definition.py +111 -0
- extract_msg/structures/time_zone_struct.py +102 -0
- extract_msg/structures/toc_entry.py +137 -0
- extract_msg/structures/tz_rule.py +148 -0
- extract_msg/utils.py +1270 -0
- extract_msg-0.48.2.dist-info/LICENSE.txt +674 -0
- extract_msg-0.48.2.dist-info/METADATA +321 -0
- extract_msg-0.48.2.dist-info/RECORD +95 -0
- extract_msg-0.48.2.dist-info/WHEEL +5 -0
- extract_msg-0.48.2.dist-info/entry_points.txt +2 -0
- extract_msg-0.48.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"""
|
|
2
|
+
File for handling specialized encoding tasks or information.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
'lookupCodePage',
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# This adds additional encodings to python.
|
|
11
|
+
import ebcdic as _
|
|
12
|
+
import codecs
|
|
13
|
+
|
|
14
|
+
from ..exceptions import UnknownCodepageError, UnsupportedEncodingError
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# This is a dictionary matching the code page number to it's encoding name.
|
|
18
|
+
# The list used to make this can be found here:
|
|
19
|
+
# https://docs.microsoft.com/en-us/windows/win32/intl/code-page-identifiers
|
|
20
|
+
### TODO:
|
|
21
|
+
# Many of these code pages are not supported by Python. As such, we should
|
|
22
|
+
# really implement them ourselves to make sure that if someone wants to use an
|
|
23
|
+
# MSG file with one of those encodings, they are able to. Perhaps we should
|
|
24
|
+
# create a seperate module for that?
|
|
25
|
+
# Code pages that currently don't have a supported encoding will be preceded by
|
|
26
|
+
# `# UNSUPPORTED`.
|
|
27
|
+
# For some of these, it is also possible that the name we are trying to find
|
|
28
|
+
# them with is not known to Python. I have already confirmed this for a few of
|
|
29
|
+
# them, and adjusted their names to ones that python would recognize. It is
|
|
30
|
+
# Possible I missed a few.
|
|
31
|
+
_CODE_PAGES = {
|
|
32
|
+
37: 'IBM037', # IBM EBCDIC US-Canada
|
|
33
|
+
437: 'IBM437', # OEM United States
|
|
34
|
+
500: 'IBM500', # IBM EBCDIC International
|
|
35
|
+
708: 'ASMO-708', # Arabic (ASMO 708)
|
|
36
|
+
# UNSUPPORTED.
|
|
37
|
+
709: '', # Arabic (ASMO-449+, BCON V4)
|
|
38
|
+
# UNSUPPORTED.
|
|
39
|
+
710: '', # Arabic - Transparent Arabic
|
|
40
|
+
# UNSUPPORTED.
|
|
41
|
+
720: 'DOS-720', # Arabic (Transparent ASMO); Arabic (DOS)
|
|
42
|
+
737: 'cp737', # OEM Greek (formerly 437G); Greek (DOS)
|
|
43
|
+
775: 'ibm775', # OEM Baltic; Baltic (DOS)
|
|
44
|
+
850: 'ibm850', # OEM Multilingual Latin 1; Western European (DOS)
|
|
45
|
+
852: 'ibm852', # OEM Latin 2; Central European (DOS)
|
|
46
|
+
855: 'IBM855', # OEM Cyrillic (primarily Russian)
|
|
47
|
+
857: 'ibm857', # OEM Turkish; Turkish (DOS)
|
|
48
|
+
858: 'cp858', # OEM Multilingual Latin 1 + Euro symbol
|
|
49
|
+
860: 'IBM860', # OEM Portuguese; Portuguese (DOS)
|
|
50
|
+
861: 'ibm861', # OEM Icelandic; Icelandic (DOS)
|
|
51
|
+
862: 'cp862', # OEM Hebrew; Hebrew (DOS)
|
|
52
|
+
863: 'IBM863', # OEM French Canadian; French Canadian (DOS)
|
|
53
|
+
864: 'IBM864', # OEM Arabic; Arabic (864)
|
|
54
|
+
865: 'IBM865', # OEM Nordic; Nordic (DOS)
|
|
55
|
+
866: 'cp866', # OEM Russian; Cyrillic (DOS)
|
|
56
|
+
869: 'ibm869', # OEM Modern Greek; Greek, Modern (DOS)
|
|
57
|
+
870: 'cp870', # IBM870 # IBM EBCDIC Multilingual/ROECE (Latin 2); IBM EBCDIC Multilingual Latin 2
|
|
58
|
+
874: 'windows-874', # ANSI/OEM Thai (ISO 8859-11); Thai (Windows)
|
|
59
|
+
875: 'cp875', # IBM EBCDIC Greek Modern
|
|
60
|
+
932: 'shift_jis', # ANSI/OEM Japanese; Japanese (Shift-JIS)
|
|
61
|
+
936: 'gb2312', # ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312)
|
|
62
|
+
949: 'ks_c_5601-1987', # ANSI/OEM Korean (Unified Hangul Code)
|
|
63
|
+
# We *must* use a custom encoding because the Python implementation differs
|
|
64
|
+
# from the Microsoft implementation.
|
|
65
|
+
950: 'windows-950', # ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5)
|
|
66
|
+
1026: 'IBM1026', # IBM EBCDIC Turkish (Latin 5)
|
|
67
|
+
1047: 'cp1047', # IBM EBCDIC Latin 1/Open System
|
|
68
|
+
1140: 'cp1140', # IBM EBCDIC US-Canada (037 + Euro symbol); IBM EBCDIC (US-Canada-Euro)
|
|
69
|
+
1141: 'cp1141', # IBM EBCDIC Germany (20273 + Euro symbol); IBM EBCDIC (Germany-Euro)
|
|
70
|
+
1142: 'cp1142', # IBM EBCDIC Denmark-Norway (20277 + Euro symbol); IBM EBCDIC (Denmark-Norway-Euro)
|
|
71
|
+
1143: 'cp1143', # IBM EBCDIC Finland-Sweden (20278 + Euro symbol); IBM EBCDIC (Finland-Sweden-Euro)
|
|
72
|
+
1144: 'cp1144', # IBM EBCDIC Italy (20280 + Euro symbol); IBM EBCDIC (Italy-Euro)
|
|
73
|
+
1145: 'cp1145', # IBM EBCDIC Latin America-Spain (20284 + Euro symbol); IBM EBCDIC (Spain-Euro)
|
|
74
|
+
1146: 'cp1146', # IBM EBCDIC United Kingdom (20285 + Euro symbol); IBM EBCDIC (UK-Euro)
|
|
75
|
+
1147: 'cp1147', # IBM EBCDIC France (20297 + Euro symbol); IBM EBCDIC (France-Euro)
|
|
76
|
+
1148: 'cp1148ms', # IBM EBCDIC International (500 + Euro symbol); IBM EBCDIC (International-Euro)
|
|
77
|
+
1149: 'cp1149', # IBM EBCDIC Icelandic (20871 + Euro symbol); IBM EBCDIC (Icelandic-Euro)
|
|
78
|
+
1200: 'utf-16-le', # Unicode UTF-16, little endian byte order (BMP of ISO 10646);
|
|
79
|
+
1201: 'utf-16-be', # Unicode UTF-16, big endian byte order;
|
|
80
|
+
1250: 'windows-1250', # ANSI Central European; Central European (Windows)
|
|
81
|
+
1251: 'windows-1251', # ANSI Cyrillic; Cyrillic (Windows)
|
|
82
|
+
1252: 'windows-1252', # ANSI Latin 1; Western European (Windows)
|
|
83
|
+
1253: 'windows-1253', # ANSI Greek; Greek (Windows)
|
|
84
|
+
1254: 'windows-1254', # ANSI Turkish; Turkish (Windows)
|
|
85
|
+
1255: 'windows-1255', # ANSI Hebrew; Hebrew (Windows)
|
|
86
|
+
1256: 'windows-1256', # ANSI Arabic; Arabic (Windows)
|
|
87
|
+
1257: 'windows-1257', # ANSI Baltic; Baltic (Windows)
|
|
88
|
+
1258: 'windows-1258', # ANSI/OEM Vietnamese; Vietnamese (Windows)
|
|
89
|
+
1361: 'Johab', # Korean (Johab)
|
|
90
|
+
10000: 'macintosh', # MAC Roman; Western European (Mac)
|
|
91
|
+
10001: 'x-mac-japanese', # Japanese (Mac)
|
|
92
|
+
# UNSUPPORTED.
|
|
93
|
+
10002: 'x-mac-chinesetrad', # MAC Traditional Chinese (Big5); Chinese Traditional (Mac)
|
|
94
|
+
10003: 'x-mac-korean', # Korean (Mac)
|
|
95
|
+
# UNSUPPORTED.
|
|
96
|
+
10004: 'x-mac-arabic', # Arabic (Mac)
|
|
97
|
+
# UNSUPPORTED.
|
|
98
|
+
10005: 'x-mac-hebrew', # Hebrew (Mac)
|
|
99
|
+
10006: 'x-mac-greek', # Greek (Mac)
|
|
100
|
+
10007: 'x-mac-cyrillic', # Cyrillic (Mac)
|
|
101
|
+
# UNSUPPORTED.
|
|
102
|
+
10008: 'x-mac-chinesesimp', # MAC Simplified Chinese (GB 2312); Chinese Simplified (Mac)
|
|
103
|
+
# UNSUPPORTED.
|
|
104
|
+
10010: 'x-mac-romanian', # Romanian (Mac)
|
|
105
|
+
# UNSUPPORTED.
|
|
106
|
+
10017: 'x-mac-ukrainian', # Ukrainian (Mac)
|
|
107
|
+
# UNSUPPORTED.
|
|
108
|
+
10021: 'x-mac-thai', # Thai (Mac)
|
|
109
|
+
10029: 'x-mac-ce', # MAC Latin 2; Central European (Mac)
|
|
110
|
+
10079: 'x-mac-icelandic', # Icelandic (Mac)
|
|
111
|
+
10081: 'x-mac-turkish', # Turkish (Mac)
|
|
112
|
+
# UNSUPPORTED.
|
|
113
|
+
10082: 'x-mac-croatian', # Croatian (Mac)
|
|
114
|
+
12000: 'utf-32', # Unicode UTF-32, little endian byte order
|
|
115
|
+
12001: 'utf-32BE', # Unicode UTF-32, big endian byte order
|
|
116
|
+
# UNSUPPORTED.
|
|
117
|
+
20000: 'x-Chinese_CNS', # CNS Taiwan; Chinese Traditional (CNS)
|
|
118
|
+
# UNSUPPORTED.
|
|
119
|
+
20001: 'x-cp20001', # TCA Taiwan
|
|
120
|
+
# UNSUPPORTED.
|
|
121
|
+
20002: 'x_Chinese-Eten', # Eten Taiwan; Chinese Traditional (Eten)
|
|
122
|
+
# UNSUPPORTED.
|
|
123
|
+
20003: 'x-cp20003', # IBM5550 Taiwan
|
|
124
|
+
# UNSUPPORTED.
|
|
125
|
+
20004: 'x-cp20004', # TeleText Taiwan
|
|
126
|
+
# UNSUPPORTED.
|
|
127
|
+
20005: 'x-cp20005', # Wang Taiwan
|
|
128
|
+
# UNSUPPORTED.
|
|
129
|
+
20105: 'x-IA5', # IA5 (IRV International Alphabet No. 5, 7-bit); Western European (IA5)
|
|
130
|
+
# UNSUPPORTED.
|
|
131
|
+
20106: 'x-IA5-German', # IA5 German (7-bit)
|
|
132
|
+
# UNSUPPORTED.
|
|
133
|
+
20107: 'x-IA5-Swedish', # IA5 Swedish (7-bit)
|
|
134
|
+
# UNSUPPORTED.
|
|
135
|
+
20108: 'x-IA5-Norwegian', # IA5 Norwegian (7-bit)
|
|
136
|
+
20127: 'us-ascii', # US-ASCII (7-bit)
|
|
137
|
+
# UNSUPPORTED.
|
|
138
|
+
20261: 'x-cp20261', # T.61
|
|
139
|
+
# UNSUPPORTED.
|
|
140
|
+
20269: 'x-cp20269', # ISO 6937 Non-Spacing Accent
|
|
141
|
+
20273: 'IBM273', # IBM EBCDIC Germany
|
|
142
|
+
20277: 'cp277', # IBM EBCDIC Denmark-Norway
|
|
143
|
+
20278: 'cp278', # IBM EBCDIC Finland-Sweden
|
|
144
|
+
20280: 'cp280', # IBM EBCDIC Italy
|
|
145
|
+
20284: 'cp284', # IBM EBCDIC Latin America-Spain
|
|
146
|
+
20285: 'cp285', # IBM EBCDIC United Kingdom
|
|
147
|
+
20290: 'cp290', # IBM EBCDIC Japanese Katakana Extended
|
|
148
|
+
20297: 'cp297', # IBM EBCDIC France
|
|
149
|
+
20420: 'cp420', # IBM EBCDIC Arabic
|
|
150
|
+
# UNSUPPORTED.
|
|
151
|
+
20423: 'IBM423', # IBM EBCDIC Greek
|
|
152
|
+
20424: 'IBM424', # IBM EBCDIC Hebrew
|
|
153
|
+
20833: 'cp833', # IBM EBCDIC Korean Extended
|
|
154
|
+
20838: 'cp838', # IBM EBCDIC Thai
|
|
155
|
+
20866: 'koi8-r', # Russian (KOI8-R); Cyrillic (KOI8-R)
|
|
156
|
+
20871: 'cp871', # IBM EBCDIC Icelandic
|
|
157
|
+
# UNSUPPORTED.
|
|
158
|
+
20880: 'IBM880', # IBM EBCDIC Cyrillic Russian
|
|
159
|
+
# UNSUPPORTED.
|
|
160
|
+
20905: 'IBM905', # IBM EBCDIC Turkish
|
|
161
|
+
# UNSUPPORTED.
|
|
162
|
+
20924: 'IBM00924', # IBM EBCDIC Latin 1/Open System (1047 + Euro symbol)
|
|
163
|
+
20932: 'EUC-JP', # Japanese (JIS 0208-1990 and 0212-1990)
|
|
164
|
+
# UNSUPPORTED.
|
|
165
|
+
20936: 'x-cp20936', # Simplified Chinese (GB2312); Chinese Simplified (GB2312-80)
|
|
166
|
+
# UNSUPPORTED.
|
|
167
|
+
20949: 'x-cp20949', # Korean Wansung
|
|
168
|
+
21025: 'cp1025', # IBM EBCDIC Cyrillic Serbian-Bulgarian
|
|
169
|
+
# UNSUPPORTED.
|
|
170
|
+
21027: '', # (deprecated)
|
|
171
|
+
21866: 'koi8-u', # Ukrainian (KOI8-U); Cyrillic (KOI8-U)
|
|
172
|
+
28591: 'iso-8859-1', # ISO 8859-1 Latin 1; Western European (ISO)
|
|
173
|
+
28592: 'iso-8859-2', # ISO 8859-2 Central European; Central European (ISO)
|
|
174
|
+
28593: 'iso-8859-3', # ISO 8859-3 Latin 3
|
|
175
|
+
28594: 'iso-8859-4', # ISO 8859-4 Baltic
|
|
176
|
+
28595: 'iso-8859-5', # ISO 8859-5 Cyrillic
|
|
177
|
+
28596: 'iso-8859-6', # ISO 8859-6 Arabic
|
|
178
|
+
28597: 'iso-8859-7', # ISO 8859-7 Greek
|
|
179
|
+
28598: 'iso-8859-8', # ISO 8859-8 Hebrew; Hebrew (ISO-Visual)
|
|
180
|
+
28599: 'iso-8859-9', # ISO 8859-9 Turkish
|
|
181
|
+
28603: 'iso-8859-13', # ISO 8859-13 Estonian
|
|
182
|
+
28605: 'iso-8859-15', # ISO 8859-15 Latin 9
|
|
183
|
+
# UNSUPPORTED.
|
|
184
|
+
29001: 'x-Europa', # Europa 3
|
|
185
|
+
# UNSUPPORTED.
|
|
186
|
+
38598: 'iso-8859-8-i', # ISO 8859-8 Hebrew; Hebrew (ISO-Logical)
|
|
187
|
+
50220: 'iso-2022-jp', # ISO 2022 Japanese with no halfwidth Katakana; Japanese (JIS)
|
|
188
|
+
50221: 'csISO2022JP', # ISO 2022 Japanese with halfwidth Katakana; Japanese (JIS-Allow 1 byte Kana)
|
|
189
|
+
50222: 'iso-2022-jp', # ISO 2022 Japanese JIS X 0201-1989; Japanese (JIS-Allow 1 byte Kana - SO/SI)
|
|
190
|
+
50225: 'iso-2022-kr', # ISO 2022 Korean
|
|
191
|
+
# UNSUPPORTED.
|
|
192
|
+
50227: 'x-cp50227', # ISO 2022 Simplified Chinese; Chinese Simplified (ISO 2022)
|
|
193
|
+
# UNSUPPORTED.
|
|
194
|
+
50229: '', # ISO 2022 Traditional Chinese
|
|
195
|
+
# UNSUPPORTED.
|
|
196
|
+
50930: '', # EBCDIC Japanese (Katakana) Extended
|
|
197
|
+
# UNSUPPORTED.
|
|
198
|
+
50931: '', # EBCDIC US-Canada and Japanese
|
|
199
|
+
# UNSUPPORTED.
|
|
200
|
+
50933: '', # EBCDIC Korean Extended and Korean
|
|
201
|
+
# UNSUPPORTED.
|
|
202
|
+
50935: '', # EBCDIC Simplified Chinese Extended and Simplified Chinese
|
|
203
|
+
# UNSUPPORTED.
|
|
204
|
+
50936: '', # EBCDIC Simplified Chinese
|
|
205
|
+
# UNSUPPORTED.
|
|
206
|
+
50937: '', # EBCDIC US-Canada and Traditional Chinese
|
|
207
|
+
# UNSUPPORTED.
|
|
208
|
+
50939: '', # EBCDIC Japanese (Latin) Extended and Japanese
|
|
209
|
+
51932: 'euc-jp', # EUC Japanese
|
|
210
|
+
51936: 'EUC-CN', # EUC Simplified Chinese; Chinese Simplified (EUC)
|
|
211
|
+
51949: 'euc-kr', # EUC Korean
|
|
212
|
+
# UNSUPPORTED.
|
|
213
|
+
51950: '', # EUC Traditional Chinese
|
|
214
|
+
52936: 'hz-gb-2312', # HZ-GB2312 Simplified Chinese; Chinese Simplified (HZ)
|
|
215
|
+
54936: 'GB18030', # Windows XP and later: GB18030 Simplified Chinese (4 byte); Chinese Simplified (GB18030)
|
|
216
|
+
# UNSUPPORTED.
|
|
217
|
+
57002: 'x-iscii-de', # ISCII Devanagari
|
|
218
|
+
# UNSUPPORTED.
|
|
219
|
+
57003: 'x-iscii-be', # ISCII Bangla
|
|
220
|
+
# UNSUPPORTED.
|
|
221
|
+
57004: 'x-iscii-ta', # ISCII Tamil
|
|
222
|
+
# UNSUPPORTED.
|
|
223
|
+
57005: 'x-iscii-te', # ISCII Telugu
|
|
224
|
+
# UNSUPPORTED.
|
|
225
|
+
57006: 'x-iscii-as', # ISCII Assamese
|
|
226
|
+
# UNSUPPORTED.
|
|
227
|
+
57007: 'x-iscii-or', # ISCII Odia
|
|
228
|
+
# UNSUPPORTED.
|
|
229
|
+
57008: 'x-iscii-ka', # ISCII Kannada
|
|
230
|
+
# UNSUPPORTED.
|
|
231
|
+
57009: 'x-iscii-ma', # ISCII Malayalam
|
|
232
|
+
# UNSUPPORTED.
|
|
233
|
+
57010: 'x-iscii-gu', # ISCII Gujarati
|
|
234
|
+
# UNSUPPORTED.
|
|
235
|
+
57011: 'x-iscii-pa', # ISCII Punjabi
|
|
236
|
+
65000: 'utf-7', # Unicode (UTF-7)
|
|
237
|
+
65001: 'utf-8', # Unicode (UTF-8)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Register new encodings.
|
|
241
|
+
|
|
242
|
+
def lookupCodePage(id_: int) -> str:
|
|
243
|
+
"""
|
|
244
|
+
Converts an encoding id into it's name.
|
|
245
|
+
|
|
246
|
+
:raises UnknownCodepageError: The code page was not recognized.
|
|
247
|
+
:raises UnsupportedEncodingError: The code page was recognized, but no
|
|
248
|
+
encoding exists in the environment with support for it.
|
|
249
|
+
"""
|
|
250
|
+
if id_ in _CODE_PAGES:
|
|
251
|
+
if (page := _CODE_PAGES[id_]):
|
|
252
|
+
return page
|
|
253
|
+
else:
|
|
254
|
+
raise UnsupportedEncodingError(f'Code page {id_} is unsupported.')
|
|
255
|
+
else:
|
|
256
|
+
raise UnknownCodepageError(f'Unknown code page {id_}.')
|
|
257
|
+
|
|
258
|
+
def _lookupEncoding(name):
|
|
259
|
+
return _codecsInfo.get(name)
|
|
260
|
+
|
|
261
|
+
from .utils import createSBEncoding as _sb, createVBEncoding as _vb
|
|
262
|
+
from ._dt import (
|
|
263
|
+
_mac_ce, _mac_cyrillic, _mac_greek, _mac_iceland, _mac_turkish,
|
|
264
|
+
_win874_dec, _win950_dec
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
_codecsInfo = {
|
|
268
|
+
'x_mac_ce': _sb('x-mac-ce', _mac_ce.decodingTable),
|
|
269
|
+
'x_mac_cyrillic': _sb('x-mac-cyrillic', _mac_cyrillic.decodingTable),
|
|
270
|
+
'x_mac_greek': _sb('x-mac-greek', _mac_greek.decodingTable),
|
|
271
|
+
'x_mac_icelandic': _sb('x-mac-icelandic', _mac_iceland.decodingTable),
|
|
272
|
+
'x_mac_turkish': _sb('x-mac-turkish', _mac_turkish.decodingTable),
|
|
273
|
+
'windows_950': _vb('windows-950', _win950_dec.decodingTable),
|
|
274
|
+
'windows_874': _sb('windows-874', _win874_dec.decodingTable),
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
codecs.register(_lookupEncoding)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0b',12:'\x0c',13:'\r',14:'\x0e',15:'\x0f',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1a',27:'\x1b',28:'\x1c',29:'\x1d',30:'\x1e',31:'\x1f',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7f',128:'\xC4',129:'\u0100',130:'\u0101',131:'\xC9',132:'\u0104',133:'\xD6',134:'\xDC',135:'\xE1',136:'\u0105',137:'\u010C',138:'\xE4',139:'\u010D',140:'\u0106',141:'\u0107',142:'\xE9',143:'\u0179',144:'\u017A',145:'\u010E',146:'\xED',147:'\u010F',148:'\u0112',149:'\u0113',150:'\u0116',151:'\xF3',152:'\u0117',153:'\xF4',154:'\xF6',155:'\xF5',156:'\xFA',157:'\u011A',158:'\u011B',159:'\xFC',160:'\u2020',161:'\xB0',162:'\u0118',163:'\xA3',164:'\xA7',165:'\u2022',166:'\xB6',167:'\xDF',168:'\xAE',169:'\xA9',170:'\u2122',171:'\u0119',172:'\xA8',173:'\u2260',174:'\u0123',175:'\u012E',176:'\u012F',177:'\u012A',178:'\u2264',179:'\u2265',180:'\u012B',181:'\u0136',182:'\u2202',183:'\u2211',184:'\u0142',185:'\u013B',186:'\u013C',187:'\u013D',188:'\u013E',189:'\u0139',190:'\u013A',191:'\u0145',192:'\u0146',193:'\u0143',194:'\xAC',195:'\u221A',196:'\u0144',197:'\u0147',198:'\u2206',199:'\xAB',200:'\xBB',201:'\u2026',202:'\xA0',203:'\u0148',204:'\u0150',205:'\xD5',206:'\u0151',207:'\u014C',208:'\u2013',209:'\u2014',210:'\u201C',211:'\u201D',212:'\u2018',213:'\u2019',214:'\xF7',215:'\u25CA',216:'\u014D',217:'\u0154',218:'\u0155',219:'\u0158',220:'\u2039',221:'\u203A',222:'\u0159',223:'\u0156',224:'\u0157',225:'\u0160',226:'\u201A',227:'\u201E',228:'\u0161',229:'\u015A',230:'\u015B',231:'\xC1',232:'\u0164',233:'\u0165',234:'\xCD',235:'\u017D',236:'\u017E',237:'\u016A',238:'\xD3',239:'\xD4',240:'\u016B',241:'\u016E',242:'\xDA',243:'\u016F',244:'\u0170',245:'\u0171',246:'\u0172',247:'\u0173',248:'\xDD',249:'\xFD',250:'\u0137',251:'\u017B',252:'\u0141',253:'\u017C',254:'\u0122',255:'\u02C7'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/CYRILLIC.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0b',12:'\x0c',13:'\r',14:'\x0e',15:'\x0f',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1a',27:'\x1b',28:'\x1c',29:'\x1d',30:'\x1e',31:'\x1f',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7f',128:'\u0410',129:'\u0411',130:'\u0412',131:'\u0413',132:'\u0414',133:'\u0415',134:'\u0416',135:'\u0417',136:'\u0418',137:'\u0419',138:'\u041A',139:'\u041B',140:'\u041C',141:'\u041D',142:'\u041E',143:'\u041F',144:'\u0420',145:'\u0421',146:'\u0422',147:'\u0423',148:'\u0424',149:'\u0425',150:'\u0426',151:'\u0427',152:'\u0428',153:'\u0429',154:'\u042A',155:'\u042B',156:'\u042C',157:'\u042D',158:'\u042E',159:'\u042F',160:'\u2020',161:'\xB0',162:'\xA2',163:'\xA3',164:'\xA7',165:'\u2022',166:'\xB6',167:'\u0406',168:'\xAE',169:'\xA9',170:'\u2122',171:'\u0402',172:'\u0452',173:'\u2260',174:'\u0403',175:'\u0453',176:'\u221E',177:'\xB1',178:'\u2264',179:'\u2265',180:'\u0456',181:'\xB5',182:'\u2202',183:'\u0408',184:'\u0404',185:'\u0454',186:'\u0407',187:'\u0457',188:'\u0409',189:'\u0459',190:'\u040A',191:'\u045A',192:'\u0458',193:'\u0405',194:'\xAC',195:'\u221A',196:'\u0192',197:'\u2248',198:'\u2206',199:'\xAB',200:'\xBB',201:'\u2026',202:'\xA0',203:'\u040B',204:'\u045B',205:'\u040C',206:'\u045C',207:'\u0455',208:'\u2013',209:'\u2014',210:'\u201C',211:'\u201D',212:'\u2018',213:'\u2019',214:'\xF7',215:'\u201E',216:'\u040E',217:'\u045E',218:'\u040F',219:'\u045F',220:'\u2116',221:'\u0401',222:'\u0451',223:'\u044F',224:'\u0430',225:'\u0431',226:'\u0432',227:'\u0433',228:'\u0434',229:'\u0435',230:'\u0436',231:'\u0437',232:'\u0438',233:'\u0439',234:'\u043A',235:'\u043B',236:'\u043C',237:'\u043D',238:'\u043E',239:'\u043F',240:'\u0440',241:'\u0441',242:'\u0442',243:'\u0443',244:'\u0444',245:'\u0445',246:'\u0446',247:'\u0447',248:'\u0448',249:'\u0449',250:'\u044A',251:'\u044B',252:'\u044C',253:'\u044D',254:'\u044E',255:'\xA4'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/GREEK.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0b',12:'\x0c',13:'\r',14:'\x0e',15:'\x0f',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1a',27:'\x1b',28:'\x1c',29:'\x1d',30:'\x1e',31:'\x1f',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7f',128:'\xC4',129:'\xB9',130:'\xB2',131:'\xC9',132:'\xB3',133:'\xD6',134:'\xDC',135:'\u0385',136:'\xE0',137:'\xE2',138:'\xE4',139:'\u0384',140:'\xA8',141:'\xE7',142:'\xE9',143:'\xE8',144:'\xEA',145:'\xEB',146:'\xA3',147:'\u2122',148:'\xEE',149:'\xEF',150:'\u2022',151:'\xBD',152:'\u2030',153:'\xF4',154:'\xF6',155:'\xA6',156:'\xAD',157:'\xF9',158:'\xFB',159:'\xFC',160:'\u2020',161:'\u0393',162:'\u0394',163:'\u0398',164:'\u039B',165:'\u039E',166:'\u03A0',167:'\xDF',168:'\xAE',169:'\xA9',170:'\u03A3',171:'\u03AA',172:'\xA7',173:'\u2260',174:'\xB0',175:'\u0387',176:'\u0391',177:'\xB1',178:'\u2264',179:'\u2265',180:'\xA5',181:'\u0392',182:'\u0395',183:'\u0396',184:'\u0397',185:'\u0399',186:'\u039A',187:'\u039C',188:'\u03A6',189:'\u03AB',190:'\u03A8',191:'\u03A9',192:'\u03AC',193:'\u039D',194:'\xAC',195:'\u039F',196:'\u03A1',197:'\u2248',198:'\u03A4',199:'\xAB',200:'\xBB',201:'\u2026',202:'\xA0',203:'\u03A5',204:'\u03A7',205:'\u0386',206:'\u0388',207:'\u0153',208:'\u2013',209:'\u2015',210:'\u201C',211:'\u201D',212:'\u2018',213:'\u2019',214:'\xF7',215:'\u0389',216:'\u038A',217:'\u038C',218:'\u038E',219:'\u03AD',220:'\u03AE',221:'\u03AF',222:'\u03CC',223:'\u038F',224:'\u03CD',225:'\u03B1',226:'\u03B2',227:'\u03C8',228:'\u03B4',229:'\u03B5',230:'\u03C6',231:'\u03B3',232:'\u03B7',233:'\u03B9',234:'\u03BE',235:'\u03BA',236:'\u03BB',237:'\u03BC',238:'\u03BD',239:'\u03BF',240:'\u03C0',241:'\u03CE',242:'\u03C1',243:'\u03C3',244:'\u03C4',245:'\u03B8',246:'\u03C9',247:'\u03C2',248:'\u03C7',249:'\u03C5',250:'\u03B6',251:'\u03CA',252:'\u03CB',253:'\u0390',254:'\u03B0'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/ICELAND.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0b',12:'\x0c',13:'\r',14:'\x0e',15:'\x0f',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1a',27:'\x1b',28:'\x1c',29:'\x1d',30:'\x1e',31:'\x1f',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7f',128:'\xC4',129:'\xC5',130:'\xC7',131:'\xC9',132:'\xD1',133:'\xD6',134:'\xDC',135:'\xE1',136:'\xE0',137:'\xE2',138:'\xE4',139:'\xE3',140:'\xE5',141:'\xE7',142:'\xE9',143:'\xE8',144:'\xEA',145:'\xEB',146:'\xED',147:'\xEC',148:'\xEE',149:'\xEF',150:'\xF1',151:'\xF3',152:'\xF2',153:'\xF4',154:'\xF6',155:'\xF5',156:'\xFA',157:'\xF9',158:'\xFB',159:'\xFC',160:'\xDD',161:'\xB0',162:'\xA2',163:'\xA3',164:'\xA7',165:'\u2022',166:'\xB6',167:'\xDF',168:'\xAE',169:'\xA9',170:'\u2122',171:'\xB4',172:'\xA8',173:'\u2260',174:'\xC6',175:'\xD8',176:'\u221E',177:'\xB1',178:'\u2264',179:'\u2265',180:'\xA5',181:'\xB5',182:'\u2202',183:'\u2211',184:'\u220F',185:'\u03C0',186:'\u222B',187:'\xAA',188:'\xBA',189:'\u2126',190:'\xE6',191:'\xF8',192:'\xBF',193:'\xA1',194:'\xAC',195:'\u221A',196:'\u0192',197:'\u2248',198:'\u2206',199:'\xAB',200:'\xBB',201:'\u2026',202:'\xA0',203:'\xC0',204:'\xC3',205:'\xD5',206:'\u0152',207:'\u0153',208:'\u2013',209:'\u2014',210:'\u201C',211:'\u201D',212:'\u2018',213:'\u2019',214:'\xF7',215:'\u25CA',216:'\xFF',217:'\u0178',218:'\u2044',219:'\xA4',220:'\xD0',221:'\xF0',222:'\xDE',223:'\xFE',224:'\xFD',225:'\xB7',226:'\u201A',227:'\u201E',228:'\u2030',229:'\xC2',230:'\xCA',231:'\xC1',232:'\xCB',233:'\xC8',234:'\xCD',235:'\xCE',236:'\xCF',237:'\xCC',238:'\xD3',239:'\xD4',241:'\xD2',242:'\xDA',243:'\xDB',244:'\xD9',245:'\u0131',246:'\u02C6',247:'\u02DC',248:'\xAF',249:'\u02D8',250:'\u02D9',251:'\u02DA',252:'\xB8',253:'\u02DD',254:'\u02DB',255:'\u02C7'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/MAC/TURKISH.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0b',12:'\x0c',13:'\r',14:'\x0e',15:'\x0f',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1a',27:'\x1b',28:'\x1c',29:'\x1d',30:'\x1e',31:'\x1f',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7f',128:'\xC4',129:'\xC5',130:'\xC7',131:'\xC9',132:'\xD1',133:'\xD6',134:'\xDC',135:'\xE1',136:'\xE0',137:'\xE2',138:'\xE4',139:'\xE3',140:'\xE5',141:'\xE7',142:'\xE9',143:'\xE8',144:'\xEA',145:'\xEB',146:'\xED',147:'\xEC',148:'\xEE',149:'\xEF',150:'\xF1',151:'\xF3',152:'\xF2',153:'\xF4',154:'\xF6',155:'\xF5',156:'\xFA',157:'\xF9',158:'\xFB',159:'\xFC',160:'\u2020',161:'\xB0',162:'\xA2',163:'\xA3',164:'\xA7',165:'\u2022',166:'\xB6',167:'\xDF',168:'\xAE',169:'\xA9',170:'\u2122',171:'\xB4',172:'\xA8',173:'\u2260',174:'\xC6',175:'\xD8',176:'\u221E',177:'\xB1',178:'\u2264',179:'\u2265',180:'\xA5',181:'\xB5',182:'\u2202',183:'\u2211',184:'\u220F',185:'\u03C0',186:'\u222B',187:'\xAA',188:'\xBA',189:'\u2126',190:'\xE6',191:'\xF8',192:'\xBF',193:'\xA1',194:'\xAC',195:'\u221A',196:'\u0192',197:'\u2248',198:'\u2206',199:'\xAB',200:'\xBB',201:'\u2026',202:'\xA0',203:'\xC0',204:'\xC3',205:'\xD5',206:'\u0152',207:'\u0153',208:'\u2013',209:'\u2014',210:'\u201C',211:'\u201D',212:'\u2018',213:'\u2019',214:'\xF7',215:'\u25CA',216:'\xFF',217:'\u0178',218:'\u011E',219:'\u011F',220:'\u0130',221:'\u0131',222:'\u015E',223:'\u015F',224:'\u2021',225:'\xB7',226:'\u201A',227:'\u201E',228:'\u2030',229:'\xC2',230:'\xCA',231:'\xC1',232:'\xCB',233:'\xC8',234:'\xCD',235:'\xCE',236:'\xCF',237:'\xCC',238:'\xD3',239:'\xD4',241:'\xD2',242:'\xDA',243:'\xDB',244:'\xD9',246:'\u02C6',247:'\u02DC',248:'\xAF',249:'\u02D8',250:'\u02D9',251:'\u02DA',252:'\xB8',253:'\u02DD',254:'\u02DB',255:'\u02C7'}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Based on https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT
|
|
2
|
+
|
|
3
|
+
__all__ = [
|
|
4
|
+
'decodingTable',
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
decodingTable={0:'\x00',1:'\x01',2:'\x02',3:'\x03',4:'\x04',5:'\x05',6:'\x06',7:'\x07',8:'\x08',9:'\t',10:'\n',11:'\x0B',12:'\x0C',13:'\r',14:'\x0E',15:'\x0F',16:'\x10',17:'\x11',18:'\x12',19:'\x13',20:'\x14',21:'\x15',22:'\x16',23:'\x17',24:'\x18',25:'\x19',26:'\x1A',27:'\x1B',28:'\x1C',29:'\x1D',30:'\x1E',31:'\x1F',32:' ',33:'!',34:'"',35:'#',36:'$',37:'%',38:'&',39:"'",40:'(',41:')',42:'*',43:'+',44:',',45:'-',46:'.',47:'/',48:'0',49:'1',50:'2',51:'3',52:'4',53:'5',54:'6',55:'7',56:'8',57:'9',58:':',59:';',60:'<',61:'=',62:'>',63:'?',64:'@',65:'A',66:'B',67:'C',68:'D',69:'E',70:'F',71:'G',72:'H',73:'I',74:'J',75:'K',76:'L',77:'M',78:'N',79:'O',80:'P',81:'Q',82:'R',83:'S',84:'T',85:'U',86:'V',87:'W',88:'X',89:'Y',90:'Z',91:'[',92:'\\',93:']',94:'^',95:'_',96:'`',97:'a',98:'b',99:'c',100:'d',101:'e',102:'f',103:'g',104:'h',105:'i',106:'j',107:'k',108:'l',109:'m',110:'n',111:'o',112:'p',113:'q',114:'r',115:'s',116:'t',117:'u',118:'v',119:'w',120:'x',121:'y',122:'z',123:'{',124:'|',125:'}',126:'~',127:'\x7F',128:'\x80',129:'\u20AC',133:'\u2026',145:'\u2018',146:'\u2019',147:'\u201C',148:'\u201D',149:'\u2022',150:'\u2013',151:'\u2014',160:'\xA0',161:'\u0E01',162:'\u0E02',163:'\u0E03',164:'\u0E04',165:'\u0E05',166:'\u0E06',167:'\u0E07',168:'\u0E08',169:'\u0E09',170:'\u0E0A',171:'\u0E0B',172:'\u0E0C',173:'\u0E0D',174:'\u0E0E',175:'\u0E0F',176:'\u0E10',177:'\u0E11',178:'\u0E12',179:'\u0E13',180:'\u0E14',181:'\u0E15',182:'\u0E16',183:'\u0E17',184:'\u0E18',185:'\u0E19',186:'\u0E1A',187:'\u0E1B',188:'\u0E1C',189:'\u0E1D',190:'\u0E1E',191:'\u0E1F',192:'\u0E20',193:'\u0E21',194:'\u0E22',195:'\u0E23',196:'\u0E24',197:'\u0E25',198:'\u0E26',199:'\u0E27',200:'\u0E28',201:'\u0E29',202:'\u0E2A',203:'\u0E2B',204:'\u0E2C',205:'\u0E2D',206:'\u0E2E',207:'\u0E2F',208:'\u0E30',209:'\u0E31',210:'\u0E32',211:'\u0E33',212:'\u0E34',213:'\u0E35',214:'\u0E36',215:'\u0E37',216:'\u0E38',217:'\u0E39',218:'\u0E3A',224:'\u0E3F',225:'\u0E40',226:'\u0E41',227:'\u0E42',228:'\u0E43',229:'\u0E44',230:'\u0E45',231:'\u0E46',232:'\u0E47',233:'\u0E48',234:'\u0E49',235:'\u0E4A',236:'\u0E4B',237:'\u0E4C',238:'\u0E4D',239:'\u0E4E',240:'\u0E4F',241:'\u0E50',242:'\u0E51',243:'\u0E52',244:'\u0E53',245:'\u0E54',246:'\u0E55',247:'\u0E56',248:'\u0E57',249:'\u0E58',250:'\u0E59',251:'\u0E5A',252:'\u0E5B'}
|