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