ยปCore Development>Code coverage>Lib/encodings/ptcp154.py

Python code coverage for Lib/encodings/ptcp154.py

#countcontent
1n/a""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py.
2n/a
3n/aWritten by Marc-Andre Lemburg (mal@lemburg.com).
4n/a
5n/a(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
6n/a(c) Copyright 2000 Guido van Rossum.
7n/a
8n/a"""#"
9n/a
10n/aimport codecs
11n/a
12n/a### Codec APIs
13n/a
14n/aclass Codec(codecs.Codec):
15n/a
16n/a def encode(self,input,errors='strict'):
17n/a return codecs.charmap_encode(input,errors,encoding_table)
18n/a
19n/a def decode(self,input,errors='strict'):
20n/a return codecs.charmap_decode(input,errors,decoding_table)
21n/a
22n/aclass IncrementalEncoder(codecs.IncrementalEncoder):
23n/a def encode(self, input, final=False):
24n/a return codecs.charmap_encode(input,self.errors,encoding_table)[0]
25n/a
26n/aclass IncrementalDecoder(codecs.IncrementalDecoder):
27n/a def decode(self, input, final=False):
28n/a return codecs.charmap_decode(input,self.errors,decoding_table)[0]
29n/a
30n/aclass StreamWriter(Codec,codecs.StreamWriter):
31n/a pass
32n/a
33n/aclass StreamReader(Codec,codecs.StreamReader):
34n/a pass
35n/a
36n/a### encodings module API
37n/a
38n/adef getregentry():
39n/a return codecs.CodecInfo(
40n/a name='ptcp154',
41n/a encode=Codec().encode,
42n/a decode=Codec().decode,
43n/a incrementalencoder=IncrementalEncoder,
44n/a incrementaldecoder=IncrementalDecoder,
45n/a streamreader=StreamReader,
46n/a streamwriter=StreamWriter,
47n/a )
48n/a
49n/a
50n/a### Decoding Table
51n/a
52n/adecoding_table = (
53n/a '\x00' # 0x00 -> NULL
54n/a '\x01' # 0x01 -> START OF HEADING
55n/a '\x02' # 0x02 -> START OF TEXT
56n/a '\x03' # 0x03 -> END OF TEXT
57n/a '\x04' # 0x04 -> END OF TRANSMISSION
58n/a '\x05' # 0x05 -> ENQUIRY
59n/a '\x06' # 0x06 -> ACKNOWLEDGE
60n/a '\x07' # 0x07 -> BELL
61n/a '\x08' # 0x08 -> BACKSPACE
62n/a '\t' # 0x09 -> HORIZONTAL TABULATION
63n/a '\n' # 0x0A -> LINE FEED
64n/a '\x0b' # 0x0B -> VERTICAL TABULATION
65n/a '\x0c' # 0x0C -> FORM FEED
66n/a '\r' # 0x0D -> CARRIAGE RETURN
67n/a '\x0e' # 0x0E -> SHIFT OUT
68n/a '\x0f' # 0x0F -> SHIFT IN
69n/a '\x10' # 0x10 -> DATA LINK ESCAPE
70n/a '\x11' # 0x11 -> DEVICE CONTROL ONE
71n/a '\x12' # 0x12 -> DEVICE CONTROL TWO
72n/a '\x13' # 0x13 -> DEVICE CONTROL THREE
73n/a '\x14' # 0x14 -> DEVICE CONTROL FOUR
74n/a '\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
75n/a '\x16' # 0x16 -> SYNCHRONOUS IDLE
76n/a '\x17' # 0x17 -> END OF TRANSMISSION BLOCK
77n/a '\x18' # 0x18 -> CANCEL
78n/a '\x19' # 0x19 -> END OF MEDIUM
79n/a '\x1a' # 0x1A -> SUBSTITUTE
80n/a '\x1b' # 0x1B -> ESCAPE
81n/a '\x1c' # 0x1C -> FILE SEPARATOR
82n/a '\x1d' # 0x1D -> GROUP SEPARATOR
83n/a '\x1e' # 0x1E -> RECORD SEPARATOR
84n/a '\x1f' # 0x1F -> UNIT SEPARATOR
85n/a ' ' # 0x20 -> SPACE
86n/a '!' # 0x21 -> EXCLAMATION MARK
87n/a '"' # 0x22 -> QUOTATION MARK
88n/a '#' # 0x23 -> NUMBER SIGN
89n/a '$' # 0x24 -> DOLLAR SIGN
90n/a '%' # 0x25 -> PERCENT SIGN
91n/a '&' # 0x26 -> AMPERSAND
92n/a "'" # 0x27 -> APOSTROPHE
93n/a '(' # 0x28 -> LEFT PARENTHESIS
94n/a ')' # 0x29 -> RIGHT PARENTHESIS
95n/a '*' # 0x2A -> ASTERISK
96n/a '+' # 0x2B -> PLUS SIGN
97n/a ',' # 0x2C -> COMMA
98n/a '-' # 0x2D -> HYPHEN-MINUS
99n/a '.' # 0x2E -> FULL STOP
100n/a '/' # 0x2F -> SOLIDUS
101n/a '0' # 0x30 -> DIGIT ZERO
102n/a '1' # 0x31 -> DIGIT ONE
103n/a '2' # 0x32 -> DIGIT TWO
104n/a '3' # 0x33 -> DIGIT THREE
105n/a '4' # 0x34 -> DIGIT FOUR
106n/a '5' # 0x35 -> DIGIT FIVE
107n/a '6' # 0x36 -> DIGIT SIX
108n/a '7' # 0x37 -> DIGIT SEVEN
109n/a '8' # 0x38 -> DIGIT EIGHT
110n/a '9' # 0x39 -> DIGIT NINE
111n/a ':' # 0x3A -> COLON
112n/a ';' # 0x3B -> SEMICOLON
113n/a '<' # 0x3C -> LESS-THAN SIGN
114n/a '=' # 0x3D -> EQUALS SIGN
115n/a '>' # 0x3E -> GREATER-THAN SIGN
116n/a '?' # 0x3F -> QUESTION MARK
117n/a '@' # 0x40 -> COMMERCIAL AT
118n/a 'A' # 0x41 -> LATIN CAPITAL LETTER A
119n/a 'B' # 0x42 -> LATIN CAPITAL LETTER B
120n/a 'C' # 0x43 -> LATIN CAPITAL LETTER C
121n/a 'D' # 0x44 -> LATIN CAPITAL LETTER D
122n/a 'E' # 0x45 -> LATIN CAPITAL LETTER E
123n/a 'F' # 0x46 -> LATIN CAPITAL LETTER F
124n/a 'G' # 0x47 -> LATIN CAPITAL LETTER G
125n/a 'H' # 0x48 -> LATIN CAPITAL LETTER H
126n/a 'I' # 0x49 -> LATIN CAPITAL LETTER I
127n/a 'J' # 0x4A -> LATIN CAPITAL LETTER J
128n/a 'K' # 0x4B -> LATIN CAPITAL LETTER K
129n/a 'L' # 0x4C -> LATIN CAPITAL LETTER L
130n/a 'M' # 0x4D -> LATIN CAPITAL LETTER M
131n/a 'N' # 0x4E -> LATIN CAPITAL LETTER N
132n/a 'O' # 0x4F -> LATIN CAPITAL LETTER O
133n/a 'P' # 0x50 -> LATIN CAPITAL LETTER P
134n/a 'Q' # 0x51 -> LATIN CAPITAL LETTER Q
135n/a 'R' # 0x52 -> LATIN CAPITAL LETTER R
136n/a 'S' # 0x53 -> LATIN CAPITAL LETTER S
137n/a 'T' # 0x54 -> LATIN CAPITAL LETTER T
138n/a 'U' # 0x55 -> LATIN CAPITAL LETTER U
139n/a 'V' # 0x56 -> LATIN CAPITAL LETTER V
140n/a 'W' # 0x57 -> LATIN CAPITAL LETTER W
141n/a 'X' # 0x58 -> LATIN CAPITAL LETTER X
142n/a 'Y' # 0x59 -> LATIN CAPITAL LETTER Y
143n/a 'Z' # 0x5A -> LATIN CAPITAL LETTER Z
144n/a '[' # 0x5B -> LEFT SQUARE BRACKET
145n/a '\\' # 0x5C -> REVERSE SOLIDUS
146n/a ']' # 0x5D -> RIGHT SQUARE BRACKET
147n/a '^' # 0x5E -> CIRCUMFLEX ACCENT
148n/a '_' # 0x5F -> LOW LINE
149n/a '`' # 0x60 -> GRAVE ACCENT
150n/a 'a' # 0x61 -> LATIN SMALL LETTER A
151n/a 'b' # 0x62 -> LATIN SMALL LETTER B
152n/a 'c' # 0x63 -> LATIN SMALL LETTER C
153n/a 'd' # 0x64 -> LATIN SMALL LETTER D
154n/a 'e' # 0x65 -> LATIN SMALL LETTER E
155n/a 'f' # 0x66 -> LATIN SMALL LETTER F
156n/a 'g' # 0x67 -> LATIN SMALL LETTER G
157n/a 'h' # 0x68 -> LATIN SMALL LETTER H
158n/a 'i' # 0x69 -> LATIN SMALL LETTER I
159n/a 'j' # 0x6A -> LATIN SMALL LETTER J
160n/a 'k' # 0x6B -> LATIN SMALL LETTER K
161n/a 'l' # 0x6C -> LATIN SMALL LETTER L
162n/a 'm' # 0x6D -> LATIN SMALL LETTER M
163n/a 'n' # 0x6E -> LATIN SMALL LETTER N
164n/a 'o' # 0x6F -> LATIN SMALL LETTER O
165n/a 'p' # 0x70 -> LATIN SMALL LETTER P
166n/a 'q' # 0x71 -> LATIN SMALL LETTER Q
167n/a 'r' # 0x72 -> LATIN SMALL LETTER R
168n/a 's' # 0x73 -> LATIN SMALL LETTER S
169n/a 't' # 0x74 -> LATIN SMALL LETTER T
170n/a 'u' # 0x75 -> LATIN SMALL LETTER U
171n/a 'v' # 0x76 -> LATIN SMALL LETTER V
172n/a 'w' # 0x77 -> LATIN SMALL LETTER W
173n/a 'x' # 0x78 -> LATIN SMALL LETTER X
174n/a 'y' # 0x79 -> LATIN SMALL LETTER Y
175n/a 'z' # 0x7A -> LATIN SMALL LETTER Z
176n/a '{' # 0x7B -> LEFT CURLY BRACKET
177n/a '|' # 0x7C -> VERTICAL LINE
178n/a '}' # 0x7D -> RIGHT CURLY BRACKET
179n/a '~' # 0x7E -> TILDE
180n/a '\x7f' # 0x7F -> DELETE (DEL)
181n/a '\u0496' # 0x80 -> CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
182n/a '\u0492' # 0x81 -> CYRILLIC CAPITAL LETTER GHE WITH STROKE
183n/a '\u04ee' # 0x82 -> CYRILLIC CAPITAL LETTER U WITH MACRON
184n/a '\u0493' # 0x83 -> CYRILLIC SMALL LETTER GHE WITH STROKE
185n/a '\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK
186n/a '\u2026' # 0x85 -> HORIZONTAL ELLIPSIS
187n/a '\u04b6' # 0x86 -> CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
188n/a '\u04ae' # 0x87 -> CYRILLIC CAPITAL LETTER STRAIGHT U
189n/a '\u04b2' # 0x88 -> CYRILLIC CAPITAL LETTER HA WITH DESCENDER
190n/a '\u04af' # 0x89 -> CYRILLIC SMALL LETTER STRAIGHT U
191n/a '\u04a0' # 0x8A -> CYRILLIC CAPITAL LETTER BASHKIR KA
192n/a '\u04e2' # 0x8B -> CYRILLIC CAPITAL LETTER I WITH MACRON
193n/a '\u04a2' # 0x8C -> CYRILLIC CAPITAL LETTER EN WITH DESCENDER
194n/a '\u049a' # 0x8D -> CYRILLIC CAPITAL LETTER KA WITH DESCENDER
195n/a '\u04ba' # 0x8E -> CYRILLIC CAPITAL LETTER SHHA
196n/a '\u04b8' # 0x8F -> CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
197n/a '\u0497' # 0x90 -> CYRILLIC SMALL LETTER ZHE WITH DESCENDER
198n/a '\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK
199n/a '\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK
200n/a '\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK
201n/a '\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK
202n/a '\u2022' # 0x95 -> BULLET
203n/a '\u2013' # 0x96 -> EN DASH
204n/a '\u2014' # 0x97 -> EM DASH
205n/a '\u04b3' # 0x98 -> CYRILLIC SMALL LETTER HA WITH DESCENDER
206n/a '\u04b7' # 0x99 -> CYRILLIC SMALL LETTER CHE WITH DESCENDER
207n/a '\u04a1' # 0x9A -> CYRILLIC SMALL LETTER BASHKIR KA
208n/a '\u04e3' # 0x9B -> CYRILLIC SMALL LETTER I WITH MACRON
209n/a '\u04a3' # 0x9C -> CYRILLIC SMALL LETTER EN WITH DESCENDER
210n/a '\u049b' # 0x9D -> CYRILLIC SMALL LETTER KA WITH DESCENDER
211n/a '\u04bb' # 0x9E -> CYRILLIC SMALL LETTER SHHA
212n/a '\u04b9' # 0x9F -> CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE
213n/a '\xa0' # 0xA0 -> NO-BREAK SPACE
214n/a '\u040e' # 0xA1 -> CYRILLIC CAPITAL LETTER SHORT U (Byelorussian)
215n/a '\u045e' # 0xA2 -> CYRILLIC SMALL LETTER SHORT U (Byelorussian)
216n/a '\u0408' # 0xA3 -> CYRILLIC CAPITAL LETTER JE
217n/a '\u04e8' # 0xA4 -> CYRILLIC CAPITAL LETTER BARRED O
218n/a '\u0498' # 0xA5 -> CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
219n/a '\u04b0' # 0xA6 -> CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
220n/a '\xa7' # 0xA7 -> SECTION SIGN
221n/a '\u0401' # 0xA8 -> CYRILLIC CAPITAL LETTER IO
222n/a '\xa9' # 0xA9 -> COPYRIGHT SIGN
223n/a '\u04d8' # 0xAA -> CYRILLIC CAPITAL LETTER SCHWA
224n/a '\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
225n/a '\xac' # 0xAC -> NOT SIGN
226n/a '\u04ef' # 0xAD -> CYRILLIC SMALL LETTER U WITH MACRON
227n/a '\xae' # 0xAE -> REGISTERED SIGN
228n/a '\u049c' # 0xAF -> CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
229n/a '\xb0' # 0xB0 -> DEGREE SIGN
230n/a '\u04b1' # 0xB1 -> CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
231n/a '\u0406' # 0xB2 -> CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
232n/a '\u0456' # 0xB3 -> CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
233n/a '\u0499' # 0xB4 -> CYRILLIC SMALL LETTER ZE WITH DESCENDER
234n/a '\u04e9' # 0xB5 -> CYRILLIC SMALL LETTER BARRED O
235n/a '\xb6' # 0xB6 -> PILCROW SIGN
236n/a '\xb7' # 0xB7 -> MIDDLE DOT
237n/a '\u0451' # 0xB8 -> CYRILLIC SMALL LETTER IO
238n/a '\u2116' # 0xB9 -> NUMERO SIGN
239n/a '\u04d9' # 0xBA -> CYRILLIC SMALL LETTER SCHWA
240n/a '\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
241n/a '\u0458' # 0xBC -> CYRILLIC SMALL LETTER JE
242n/a '\u04aa' # 0xBD -> CYRILLIC CAPITAL LETTER ES WITH DESCENDER
243n/a '\u04ab' # 0xBE -> CYRILLIC SMALL LETTER ES WITH DESCENDER
244n/a '\u049d' # 0xBF -> CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE
245n/a '\u0410' # 0xC0 -> CYRILLIC CAPITAL LETTER A
246n/a '\u0411' # 0xC1 -> CYRILLIC CAPITAL LETTER BE
247n/a '\u0412' # 0xC2 -> CYRILLIC CAPITAL LETTER VE
248n/a '\u0413' # 0xC3 -> CYRILLIC CAPITAL LETTER GHE
249n/a '\u0414' # 0xC4 -> CYRILLIC CAPITAL LETTER DE
250n/a '\u0415' # 0xC5 -> CYRILLIC CAPITAL LETTER IE
251n/a '\u0416' # 0xC6 -> CYRILLIC CAPITAL LETTER ZHE
252n/a '\u0417' # 0xC7 -> CYRILLIC CAPITAL LETTER ZE
253n/a '\u0418' # 0xC8 -> CYRILLIC CAPITAL LETTER I
254n/a '\u0419' # 0xC9 -> CYRILLIC CAPITAL LETTER SHORT I
255n/a '\u041a' # 0xCA -> CYRILLIC CAPITAL LETTER KA
256n/a '\u041b' # 0xCB -> CYRILLIC CAPITAL LETTER EL
257n/a '\u041c' # 0xCC -> CYRILLIC CAPITAL LETTER EM
258n/a '\u041d' # 0xCD -> CYRILLIC CAPITAL LETTER EN
259n/a '\u041e' # 0xCE -> CYRILLIC CAPITAL LETTER O
260n/a '\u041f' # 0xCF -> CYRILLIC CAPITAL LETTER PE
261n/a '\u0420' # 0xD0 -> CYRILLIC CAPITAL LETTER ER
262n/a '\u0421' # 0xD1 -> CYRILLIC CAPITAL LETTER ES
263n/a '\u0422' # 0xD2 -> CYRILLIC CAPITAL LETTER TE
264n/a '\u0423' # 0xD3 -> CYRILLIC CAPITAL LETTER U
265n/a '\u0424' # 0xD4 -> CYRILLIC CAPITAL LETTER EF
266n/a '\u0425' # 0xD5 -> CYRILLIC CAPITAL LETTER HA
267n/a '\u0426' # 0xD6 -> CYRILLIC CAPITAL LETTER TSE
268n/a '\u0427' # 0xD7 -> CYRILLIC CAPITAL LETTER CHE
269n/a '\u0428' # 0xD8 -> CYRILLIC CAPITAL LETTER SHA
270n/a '\u0429' # 0xD9 -> CYRILLIC CAPITAL LETTER SHCHA
271n/a '\u042a' # 0xDA -> CYRILLIC CAPITAL LETTER HARD SIGN
272n/a '\u042b' # 0xDB -> CYRILLIC CAPITAL LETTER YERU
273n/a '\u042c' # 0xDC -> CYRILLIC CAPITAL LETTER SOFT SIGN
274n/a '\u042d' # 0xDD -> CYRILLIC CAPITAL LETTER E
275n/a '\u042e' # 0xDE -> CYRILLIC CAPITAL LETTER YU
276n/a '\u042f' # 0xDF -> CYRILLIC CAPITAL LETTER YA
277n/a '\u0430' # 0xE0 -> CYRILLIC SMALL LETTER A
278n/a '\u0431' # 0xE1 -> CYRILLIC SMALL LETTER BE
279n/a '\u0432' # 0xE2 -> CYRILLIC SMALL LETTER VE
280n/a '\u0433' # 0xE3 -> CYRILLIC SMALL LETTER GHE
281n/a '\u0434' # 0xE4 -> CYRILLIC SMALL LETTER DE
282n/a '\u0435' # 0xE5 -> CYRILLIC SMALL LETTER IE
283n/a '\u0436' # 0xE6 -> CYRILLIC SMALL LETTER ZHE
284n/a '\u0437' # 0xE7 -> CYRILLIC SMALL LETTER ZE
285n/a '\u0438' # 0xE8 -> CYRILLIC SMALL LETTER I
286n/a '\u0439' # 0xE9 -> CYRILLIC SMALL LETTER SHORT I
287n/a '\u043a' # 0xEA -> CYRILLIC SMALL LETTER KA
288n/a '\u043b' # 0xEB -> CYRILLIC SMALL LETTER EL
289n/a '\u043c' # 0xEC -> CYRILLIC SMALL LETTER EM
290n/a '\u043d' # 0xED -> CYRILLIC SMALL LETTER EN
291n/a '\u043e' # 0xEE -> CYRILLIC SMALL LETTER O
292n/a '\u043f' # 0xEF -> CYRILLIC SMALL LETTER PE
293n/a '\u0440' # 0xF0 -> CYRILLIC SMALL LETTER ER
294n/a '\u0441' # 0xF1 -> CYRILLIC SMALL LETTER ES
295n/a '\u0442' # 0xF2 -> CYRILLIC SMALL LETTER TE
296n/a '\u0443' # 0xF3 -> CYRILLIC SMALL LETTER U
297n/a '\u0444' # 0xF4 -> CYRILLIC SMALL LETTER EF
298n/a '\u0445' # 0xF5 -> CYRILLIC SMALL LETTER HA
299n/a '\u0446' # 0xF6 -> CYRILLIC SMALL LETTER TSE
300n/a '\u0447' # 0xF7 -> CYRILLIC SMALL LETTER CHE
301n/a '\u0448' # 0xF8 -> CYRILLIC SMALL LETTER SHA
302n/a '\u0449' # 0xF9 -> CYRILLIC SMALL LETTER SHCHA
303n/a '\u044a' # 0xFA -> CYRILLIC SMALL LETTER HARD SIGN
304n/a '\u044b' # 0xFB -> CYRILLIC SMALL LETTER YERU
305n/a '\u044c' # 0xFC -> CYRILLIC SMALL LETTER SOFT SIGN
306n/a '\u044d' # 0xFD -> CYRILLIC SMALL LETTER E
307n/a '\u044e' # 0xFE -> CYRILLIC SMALL LETTER YU
308n/a '\u044f' # 0xFF -> CYRILLIC SMALL LETTER YA
309n/a)
310n/a
311n/a### Encoding table
312n/aencoding_table=codecs.charmap_build(decoding_table)