Coverage for /pythoncovmergedfiles/medio/medio/src/pdfminer.six/pdfminer/latin_enc.py: 100%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""Standard encoding tables used in PDF.
3This table is extracted from PDF Reference Manual 1.6, pp.925
4 "D.1 Latin Character Set and Encodings"
6"""
8EncodingRow = tuple[str, int | None, int | None, int | None, int | None]
10ENCODING: list[EncodingRow] = [
11 # (name, std, mac, win, pdf)
12 ("A", 65, 65, 65, 65),
13 ("AE", 225, 174, 198, 198),
14 ("Aacute", None, 231, 193, 193),
15 ("Acircumflex", None, 229, 194, 194),
16 ("Adieresis", None, 128, 196, 196),
17 ("Agrave", None, 203, 192, 192),
18 ("Aring", None, 129, 197, 197),
19 ("Atilde", None, 204, 195, 195),
20 ("B", 66, 66, 66, 66),
21 ("C", 67, 67, 67, 67),
22 ("Ccedilla", None, 130, 199, 199),
23 ("D", 68, 68, 68, 68),
24 ("E", 69, 69, 69, 69),
25 ("Eacute", None, 131, 201, 201),
26 ("Ecircumflex", None, 230, 202, 202),
27 ("Edieresis", None, 232, 203, 203),
28 ("Egrave", None, 233, 200, 200),
29 ("Eth", None, None, 208, 208),
30 ("Euro", None, None, 128, 160),
31 ("F", 70, 70, 70, 70),
32 ("G", 71, 71, 71, 71),
33 ("H", 72, 72, 72, 72),
34 ("I", 73, 73, 73, 73),
35 ("Iacute", None, 234, 205, 205),
36 ("Icircumflex", None, 235, 206, 206),
37 ("Idieresis", None, 236, 207, 207),
38 ("Igrave", None, 237, 204, 204),
39 ("J", 74, 74, 74, 74),
40 ("K", 75, 75, 75, 75),
41 ("L", 76, 76, 76, 76),
42 ("Lslash", 232, None, None, 149),
43 ("M", 77, 77, 77, 77),
44 ("N", 78, 78, 78, 78),
45 ("Ntilde", None, 132, 209, 209),
46 ("O", 79, 79, 79, 79),
47 ("OE", 234, 206, 140, 150),
48 ("Oacute", None, 238, 211, 211),
49 ("Ocircumflex", None, 239, 212, 212),
50 ("Odieresis", None, 133, 214, 214),
51 ("Ograve", None, 241, 210, 210),
52 ("Oslash", 233, 175, 216, 216),
53 ("Otilde", None, 205, 213, 213),
54 ("P", 80, 80, 80, 80),
55 ("Q", 81, 81, 81, 81),
56 ("R", 82, 82, 82, 82),
57 ("S", 83, 83, 83, 83),
58 ("Scaron", None, None, 138, 151),
59 ("T", 84, 84, 84, 84),
60 ("Thorn", None, None, 222, 222),
61 ("U", 85, 85, 85, 85),
62 ("Uacute", None, 242, 218, 218),
63 ("Ucircumflex", None, 243, 219, 219),
64 ("Udieresis", None, 134, 220, 220),
65 ("Ugrave", None, 244, 217, 217),
66 ("V", 86, 86, 86, 86),
67 ("W", 87, 87, 87, 87),
68 ("X", 88, 88, 88, 88),
69 ("Y", 89, 89, 89, 89),
70 ("Yacute", None, None, 221, 221),
71 ("Ydieresis", None, 217, 159, 152),
72 ("Z", 90, 90, 90, 90),
73 ("Zcaron", None, None, 142, 153),
74 ("a", 97, 97, 97, 97),
75 ("aacute", None, 135, 225, 225),
76 ("acircumflex", None, 137, 226, 226),
77 ("acute", 194, 171, 180, 180),
78 ("adieresis", None, 138, 228, 228),
79 ("ae", 241, 190, 230, 230),
80 ("agrave", None, 136, 224, 224),
81 ("ampersand", 38, 38, 38, 38),
82 ("aring", None, 140, 229, 229),
83 ("asciicircum", 94, 94, 94, 94),
84 ("asciitilde", 126, 126, 126, 126),
85 ("asterisk", 42, 42, 42, 42),
86 ("at", 64, 64, 64, 64),
87 ("atilde", None, 139, 227, 227),
88 ("b", 98, 98, 98, 98),
89 ("backslash", 92, 92, 92, 92),
90 ("bar", 124, 124, 124, 124),
91 ("braceleft", 123, 123, 123, 123),
92 ("braceright", 125, 125, 125, 125),
93 ("bracketleft", 91, 91, 91, 91),
94 ("bracketright", 93, 93, 93, 93),
95 ("breve", 198, 249, None, 24),
96 ("brokenbar", None, None, 166, 166),
97 ("bullet", 183, 165, 149, 128),
98 ("c", 99, 99, 99, 99),
99 ("caron", 207, 255, None, 25),
100 ("ccedilla", None, 141, 231, 231),
101 ("cedilla", 203, 252, 184, 184),
102 ("cent", 162, 162, 162, 162),
103 ("circumflex", 195, 246, 136, 26),
104 ("colon", 58, 58, 58, 58),
105 ("comma", 44, 44, 44, 44),
106 ("copyright", None, 169, 169, 169),
107 ("currency", 168, 219, 164, 164),
108 ("d", 100, 100, 100, 100),
109 ("dagger", 178, 160, 134, 129),
110 ("daggerdbl", 179, 224, 135, 130),
111 ("degree", None, 161, 176, 176),
112 ("dieresis", 200, 172, 168, 168),
113 ("divide", None, 214, 247, 247),
114 ("dollar", 36, 36, 36, 36),
115 ("dotaccent", 199, 250, None, 27),
116 ("dotlessi", 245, 245, None, 154),
117 ("e", 101, 101, 101, 101),
118 ("eacute", None, 142, 233, 233),
119 ("ecircumflex", None, 144, 234, 234),
120 ("edieresis", None, 145, 235, 235),
121 ("egrave", None, 143, 232, 232),
122 ("eight", 56, 56, 56, 56),
123 ("ellipsis", 188, 201, 133, 131),
124 ("emdash", 208, 209, 151, 132),
125 ("endash", 177, 208, 150, 133),
126 ("equal", 61, 61, 61, 61),
127 ("eth", None, None, 240, 240),
128 ("exclam", 33, 33, 33, 33),
129 ("exclamdown", 161, 193, 161, 161),
130 ("f", 102, 102, 102, 102),
131 ("fi", 174, 222, None, 147),
132 ("five", 53, 53, 53, 53),
133 ("fl", 175, 223, None, 148),
134 ("florin", 166, 196, 131, 134),
135 ("four", 52, 52, 52, 52),
136 ("fraction", 164, 218, None, 135),
137 ("g", 103, 103, 103, 103),
138 ("germandbls", 251, 167, 223, 223),
139 ("grave", 193, 96, 96, 96),
140 ("greater", 62, 62, 62, 62),
141 ("guillemotleft", 171, 199, 171, 171),
142 ("guillemotright", 187, 200, 187, 187),
143 ("guilsinglleft", 172, 220, 139, 136),
144 ("guilsinglright", 173, 221, 155, 137),
145 ("h", 104, 104, 104, 104),
146 ("hungarumlaut", 205, 253, None, 28),
147 ("hyphen", 45, 45, 45, 45),
148 ("i", 105, 105, 105, 105),
149 ("iacute", None, 146, 237, 237),
150 ("icircumflex", None, 148, 238, 238),
151 ("idieresis", None, 149, 239, 239),
152 ("igrave", None, 147, 236, 236),
153 ("j", 106, 106, 106, 106),
154 ("k", 107, 107, 107, 107),
155 ("l", 108, 108, 108, 108),
156 ("less", 60, 60, 60, 60),
157 ("logicalnot", None, 194, 172, 172),
158 ("lslash", 248, None, None, 155),
159 ("m", 109, 109, 109, 109),
160 ("macron", 197, 248, 175, 175),
161 ("minus", None, None, None, 138),
162 ("mu", None, 181, 181, 181),
163 ("multiply", None, None, 215, 215),
164 ("n", 110, 110, 110, 110),
165 ("nbspace", None, 202, 160, None),
166 ("nine", 57, 57, 57, 57),
167 ("ntilde", None, 150, 241, 241),
168 ("numbersign", 35, 35, 35, 35),
169 ("o", 111, 111, 111, 111),
170 ("oacute", None, 151, 243, 243),
171 ("ocircumflex", None, 153, 244, 244),
172 ("odieresis", None, 154, 246, 246),
173 ("oe", 250, 207, 156, 156),
174 ("ogonek", 206, 254, None, 29),
175 ("ograve", None, 152, 242, 242),
176 ("one", 49, 49, 49, 49),
177 ("onehalf", None, None, 189, 189),
178 ("onequarter", None, None, 188, 188),
179 ("onesuperior", None, None, 185, 185),
180 ("ordfeminine", 227, 187, 170, 170),
181 ("ordmasculine", 235, 188, 186, 186),
182 ("oslash", 249, 191, 248, 248),
183 ("otilde", None, 155, 245, 245),
184 ("p", 112, 112, 112, 112),
185 ("paragraph", 182, 166, 182, 182),
186 ("parenleft", 40, 40, 40, 40),
187 ("parenright", 41, 41, 41, 41),
188 ("percent", 37, 37, 37, 37),
189 ("period", 46, 46, 46, 46),
190 ("periodcentered", 180, 225, 183, 183),
191 ("perthousand", 189, 228, 137, 139),
192 ("plus", 43, 43, 43, 43),
193 ("plusminus", None, 177, 177, 177),
194 ("q", 113, 113, 113, 113),
195 ("question", 63, 63, 63, 63),
196 ("questiondown", 191, 192, 191, 191),
197 ("quotedbl", 34, 34, 34, 34),
198 ("quotedblbase", 185, 227, 132, 140),
199 ("quotedblleft", 170, 210, 147, 141),
200 ("quotedblright", 186, 211, 148, 142),
201 ("quoteleft", 96, 212, 145, 143),
202 ("quoteright", 39, 213, 146, 144),
203 ("quotesinglbase", 184, 226, 130, 145),
204 ("quotesingle", 169, 39, 39, 39),
205 ("r", 114, 114, 114, 114),
206 ("registered", None, 168, 174, 174),
207 ("ring", 202, 251, None, 30),
208 ("s", 115, 115, 115, 115),
209 ("scaron", None, None, 154, 157),
210 ("section", 167, 164, 167, 167),
211 ("semicolon", 59, 59, 59, 59),
212 ("seven", 55, 55, 55, 55),
213 ("six", 54, 54, 54, 54),
214 ("slash", 47, 47, 47, 47),
215 ("space", 32, 32, 32, 32),
216 ("space", None, 202, 160, None),
217 ("space", None, 202, 173, None),
218 ("sterling", 163, 163, 163, 163),
219 ("t", 116, 116, 116, 116),
220 ("thorn", None, None, 254, 254),
221 ("three", 51, 51, 51, 51),
222 ("threequarters", None, None, 190, 190),
223 ("threesuperior", None, None, 179, 179),
224 ("tilde", 196, 247, 152, 31),
225 ("trademark", None, 170, 153, 146),
226 ("two", 50, 50, 50, 50),
227 ("twosuperior", None, None, 178, 178),
228 ("u", 117, 117, 117, 117),
229 ("uacute", None, 156, 250, 250),
230 ("ucircumflex", None, 158, 251, 251),
231 ("udieresis", None, 159, 252, 252),
232 ("ugrave", None, 157, 249, 249),
233 ("underscore", 95, 95, 95, 95),
234 ("v", 118, 118, 118, 118),
235 ("w", 119, 119, 119, 119),
236 ("x", 120, 120, 120, 120),
237 ("y", 121, 121, 121, 121),
238 ("yacute", None, None, 253, 253),
239 ("ydieresis", None, 216, 255, 255),
240 ("yen", 165, 180, 165, 165),
241 ("z", 122, 122, 122, 122),
242 ("zcaron", None, None, 158, 158),
243 ("zero", 48, 48, 48, 48),
244]