1
+ ---
2
+ file_format : mystnb
3
+ ---
4
+
5
+ ``` {code-cell}
6
+ ---
7
+ tags: [remove-input]
8
+ ---
9
+ from IPython.display import display, Markdown
10
+ from pygmt.encodings import charset
11
+
12
+
13
+ def get_charset_mdtable(name):
14
+ """
15
+ Create a markdown table for a charset.
16
+ """
17
+ mappings = charset[name]
18
+
19
+ text = "| Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |\n"
20
+ text += "|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n"
21
+ for i in range(0o00, 0o400, 8):
22
+ chars = [mappings.get(j) for j in range(i, i + 8)]
23
+ if all(v is None for v in chars): # All characters in this row are undefined
24
+ continue
25
+ row = f"\\{i:03o}"[:-1] + "x"
26
+ chars = [f"&#x{ord(char):04x};" for char in chars]
27
+ text += f"| **{row}** | {' | '.join(chars)} |\n"
28
+ text += "\n"
29
+ return Markdown(text)
30
+ ```
31
+
1
32
# Supported Encodings and Non-ASCII Characters
2
33
3
34
GMT supports a number of encodings and each encoding contains a set of ASCII and
@@ -6,125 +37,58 @@ in arguments and text strings. When using non-ASCII characters in PyGMT, the eas
6
37
is to copy and paste the character from the encoding tables below.
7
38
8
39
** Note** : The special character � ; (REPLACEMENT CHARACTER) is used to indicate
9
- that the character is not defined in the encoding.
40
+ that the character is undefined in the encoding.
10
41
11
42
## Adobe ISOLatin1+ Encoding
12
43
13
- | octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
14
- | ---| ---| ---| ---| ---| ---| ---| ---| ---|
15
- | ** \03x** | � ; | • ; | … ; | ™ ; | — ; | – ; | fi ; | ž ; |
16
- | ** \04x** |   ; | ! ; | " ; | # ; | $ ; | % ; | & ; | ’ ; |
17
- | ** \05x** | ( ; | ) ; | * ; | + ; | , ; | - ; | . ; | / ; |
18
- | ** \06x** | 0 ; | 1 ; | 2 ; | 3 ; | 4 ; | 5 ; | 6 ; | 7 ; |
19
- | ** \07x** | 8 ; | 9 ; | : ; | ; ; | < ; | = ; | > ; | ? ; |
20
- | ** \10x** | @ ; | A ; | B ; | C ; | D ; | E ; | F ; | G ; |
21
- | ** \11x** | H ; | I ; | J ; | K ; | L ; | M ; | N ; | O ; |
22
- | ** \12x** | P ; | Q ; | R ; | S ; | T ; | U ; | V ; | W ; |
23
- | ** \13x** | X ; | Y ; | Z ; | [ ; | \ ; | ] ; | ^ ; | _ ; |
24
- | ** \14x** | ‘ ; | a ; | b ; | c ; | d ; | e ; | f ; | g ; |
25
- | ** \15x** | h ; | i ; | j ; | k ; | l ; | m ; | n ; | o ; |
26
- | ** \16x** | p ; | q ; | r ; | s ; | t ; | u ; | v ; | w ; |
27
- | ** \17x** | x ; | y ; | z ; | { ; | | ; | } ; | ~ ; | š ; |
28
- | ** \20x** | Œ ; | † ; | ‡ ; | Ł ; | ⁄ ; | ‹ ; | Š ; | › ; |
29
- | ** \21x** | œ ; | Ÿ ; | Ž ; | ł ; | ‰ ; | „ ; | “ ; | ” ; |
30
- | ** \22x** | ı ; | ` ; | ´ ; | ^ ; | ˜ ; | ¯ ; | ˘ ; | ˙ ; |
31
- | ** \23x** | ¨ ; | ‚ ; | ˚ ; | ¸ ; | ' ; | ˝ ; | ˛ ; | ˇ ; |
32
- | ** \24x** | � ; | ¡ ; | ¢ ; | £ ; | ¤ ; | ¥ ; | ¦ ; | § ; |
33
- | ** \25x** | ¨ ; | © ; | ª ; | « ; | ¬ ; | ­ ; | ® ; | ¯ ; |
34
- | ** \26x** | ° ; | ± ; | ² ; | ³ ; | ´ ; | µ ; | ¶ ; | · ; |
35
- | ** \27x** | ¸ ; | ¹ ; | º ; | » ; | ¼ ; | ½ ; | ¾ ; | ¿ ; |
36
- | ** \30x** | À ; | Á ; | Â ; | Ã ; | Ä ; | Å ; | Æ ; | Ç ; |
37
- | ** \31x** | È ; | É ; | Ê ; | Ë ; | Ì ; | Í ; | Î ; | Ï ; |
38
- | ** \32x** | Ð ; | Ñ ; | Ò ; | Ó ; | Ô ; | Õ ; | Ö ; | × ; |
39
- | ** \33x** | Ø ; | Ù ; | Ú ; | Û ; | Ü ; | Ý ; | Þ ; | ß ; |
40
- | ** \34x** | à ; | á ; | â ; | ã ; | ä ; | å ; | æ ; | ç ; |
41
- | ** \35x** | è ; | é ; | ê ; | ë ; | ì ; | í ; | î ; | ï ; |
42
- | ** \36x** | ð ; | ñ ; | ò ; | ó ; | ô ; | õ ; | ö ; | ÷ ; |
43
- | ** \37x** | ø ; | ù ; | ú ; | û ; | ü ; | ý ; | þ ; | ÿ ; |
44
+ ``` {code-cell}
45
+ ---
46
+ tags: [remove-input]
47
+ ---
48
+ display(get_charset_mdtable("ISOLatin1+"))
49
+ ```
44
50
45
51
## Adobe Symbol Encoding
46
52
47
- | octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
48
- | ---| ---| ---| ---| ---| ---| ---| ---| ---|
49
- | ** \04x** |   ; | ! ; | ∀ ; | # ; | ∃ ; | % ; | & ; | ∋ ; |
50
- | ** \05x** | ( ; | ) ; | ∗ ; | + ; | , ; | − ; | . ; | / ; |
51
- | ** \06x** | 0 ; | 1 ; | 2 ; | 3 ; | 4 ; | 5 ; | 6 ; | 7 ; |
52
- | ** \07x** | 8 ; | 9 ; | : ; | ; ; | < ; | = ; | > ; | ? ; |
53
- | ** \10x** | ≅ ; | Α ; | Β ; | Χ ; | ∆ ; | Ε ; | Φ ; | Γ ; |
54
- | ** \11x** | Η ; | Ι ; | ϑ ; | Κ ; | Λ ; | Μ ; | Ν ; | Ο ; |
55
- | ** \12x** | Π ; | Θ ; | Ρ ; | Σ ; | Τ ; | Υ ; | ς ; | Ω ; |
56
- | ** \13x** | Ξ ; | Ψ ; | Ζ ; | [ ; | ∴ ; | ] ; | ⊥ ; | _ ; |
57
- | ** \14x** |  ; | α ; | β ; | χ ; | δ ; | ε ; | φ ; | γ ; |
58
- | ** \15x** | η ; | ι ; | ϕ ; | κ ; | λ ; | μ ; | ν ; | ο ; |
59
- | ** \16x** | π ; | θ ; | ρ ; | σ ; | τ ; | υ ; | ϖ ; | ω ; |
60
- | ** \17x** | ξ ; | ψ ; | ζ ; | { ; | | ; | } ; | ∼ ; | � ; |
61
- | ** \24x** | € ; | ϒ ; | ′ ; | ≤ ; | ∕ ; | ∞ ; | ƒ ; | ♣ ; |
62
- | ** \25x** | ♦ ; | ♥ ; | ♠ ; | ↔ ; | ← ; | ↑ ; | → ; | ↓ ; |
63
- | ** \26x** | ° ; | ± ; | ″ ; | ≥ ; | × ; | ∝ ; | ∂ ; | • ; |
64
- | ** \27x** | ÷ ; | ≠ ; | ≡ ; | ≈ ; | … ; | ⏐ ; | ⎯ ; | ↵ ; |
65
- | ** \30x** | ℵ ; | ℑ ; | ℜ ; | ℘ ; | ⊗ ; | ⊕ ; | ∅ ; | ∩ ; |
66
- | ** \31x** | ∪ ; | ⊃ ; | ⊇ ; | ⊄ ; | ⊂ ; | ⊆ ; | ∈ ; | ∉ ; |
67
- | ** \32x** | ∠ ; | ∇ ; | ® ; | © ; | ™ ; | ∏ ; | √ ; | ⋅ ; |
68
- | ** \33x** | ¬ ; | ∧ ; | ∨ ; | ⇔ ; | ⇐ ; | ⇑ ; | ⇒ ; | ⇓ ; |
69
- | ** \34x** | ◊ ; | 〈 ; | ® ; | © ; | ™ ; | ∑ ; | ⎛ ; | ⎜ ; |
70
- | ** \35x** | ⎝ ; | ⎡ ; | ⎢ ; | ⎣ ; | ⎧ ; | ⎨ ; | ⎩ ; | ⎪ ; |
71
- | ** \36x** | � ; | 〉 ; | ∫ ; | ⌠ ; | ⎮ ; | ⌡ ; | ⎞ ; | ⎟ ; |
72
- | ** \37x** | ⎠ ; | ⎤ ; | ⎥ ; | ⎦ ; | ⎫ ; | ⎬ ; | ⎭ ; | � ; |
73
-
74
- ** Note** : The octal code ` \140 ` represents the RADICAL EXTENDER character, which is not available in
75
- the Unicode character set.
53
+ ``` {code-cell}
54
+ ---
55
+ tags: [remove-input]
56
+ ---
57
+ display(get_charset_mdtable("Symbol"))
58
+ ```
59
+
60
+ ** Note** : The octal code ` \140 ` represents the RADICAL EXTENDER character, which is not
61
+ available in the Unicode character set.
76
62
77
63
## Adobe ZapfDingbats Encoding
78
64
79
- | octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
80
- | ---| ---| ---| ---| ---| ---| ---| ---| ---|
81
- | ** \04x** |   ; | ✁ ; | ✂ ; | ✃ ; | ✄ ; | ☎ ; | ✆ ; | ✇ ; |
82
- | ** \05x** | ✈ ; | ✉ ; | ☛ ; | ☞ ; | ✌ ; | ✍ ; | ✎ ; | ✏ ; |
83
- | ** \06x** | ✐ ; | ✑ ; | ✒ ; | ✓ ; | ✔ ; | ✕ ; | ✖ ; | ✗ ; |
84
- | ** \07x** | ✘ ; | ✙ ; | ✚ ; | ✛ ; | ✜ ; | ✝ ; | ✞ ; | ✟ ; |
85
- | ** \10x** | ✠ ; | ✡ ; | ✢ ; | ✣ ; | ✤ ; | ✥ ; | ✦ ; | ✧ ; |
86
- | ** \11x** | ★ ; | ✩ ; | ✪ ; | ✫ ; | ✬ ; | ✭ ; | ✮ ; | ✯ ; |
87
- | ** \12x** | ✰ ; | ✱ ; | ✲ ; | ✳ ; | ✴ ; | ✵ ; | ✶ ; | ✷ ; |
88
- | ** \13x** | ✸ ; | ✹ ; | ✺ ; | ✻ ; | ✼ ; | ✽ ; | ✾ ; | ✿ ; |
89
- | ** \14x** | ❀ ; | ❁ ; | ❂ ; | ❃ ; | ❄ ; | ❅ ; | ❆ ; | ❇ ; |
90
- | ** \15x** | ❈ ; | ❉ ; | ❊ ; | ❋ ; | ● ; | ❍ ; | ■ ; | ❏ ; |
91
- | ** \16x** | ❐ ; | ❑ ; | ❒ ; | ▲ ; | ▼ ; | ◆ ; | ❖ ; | ◗ ; |
92
- | ** \17x** | ❘ ; | ❙ ; | ❚ ; | ❛ ; | ❜ ; | ❝ ; | ❞ ; | � ; |
93
- | ** \20x** | ❨ ; | ❩ ; | ❪ ; | ❫ ; | ❬ ; | ❭ ; | ❮ ; | ❯ ; |
94
- | ** \21x** | ❰ ; | ❱ ; | ❲ ; | ❳ ; | ❴ ; | ❵ ; | � ; | � ; |
95
- | ** \24x** | � ; | ❡ ; | ❢ ; | ❣ ; | ❤ ; | ❥ ; | ❦ ; | ❧ ; |
96
- | ** \25x** | ♣ ; | ♦ ; | ♥ ; | ♠ ; | ① ; | ② ; | ③ ; | ④ ; |
97
- | ** \26x** | ⑤ ; | ⑥ ; | ⑦ ; | ⑧ ; | ⑨ ; | ⑩ ; | ❶ ; | ❷ ; |
98
- | ** \27x** | ❸ ; | ❹ ; | ❺ ; | ❻ ; | ❼ ; | ❽ ; | ❾ ; | ❿ ; |
99
- | ** \30x** | ➀ ; | ➁ ; | ➂ ; | ➃ ; | ➄ ; | ➅ ; | ➆ ; | ➇ ; |
100
- | ** \31x** | ➈ ; | ➉ ; | ➊ ; | ➋ ; | ➌ ; | ➍ ; | ➎ ; | ➏ ; |
101
- | ** \32x** | ➐ ; | ➑ ; | ➒ ; | ➓ ; | ➔ ; | → ; | ↔ ; | ↕ ; |
102
- | ** \33x** | ➘ ; | ➙ ; | ➚ ; | ➛ ; | ➜ ; | ➝ ; | ➞ ; | ➟ ; |
103
- | ** \34x** | ➠ ; | ➡ ; | ➢ ; | ➣ ; | ➤ ; | ➥ ; | ➦ ; | ➧ ; |
104
- | ** \35x** | ➨ ; | ➩ ; | ➪ ; | ➫ ; | ➬ ; | ➭ ; | ➮ ; | ➯ ; |
105
- | ** \36x** | � ; | ➱ ; | ➲ ; | ➳ ; | ➴ ; | ➵ ; | ➶ ; | ➷ ; |
106
- | ** \37x** | ➸ ; | ➹ ; | ➺ ; | ➻ ; | ➼ ; | ➽ ; | ➾ ; | � ; |
65
+ ``` {code-cell}
66
+ ---
67
+ tags: [remove-input]
68
+ ---
69
+ display(get_charset_mdtable("ZapfDingbats"))
70
+ ```
107
71
108
72
## ISO/IEC 8859
109
73
110
74
PyGMT also supports the ISO/IEC 8859 standard for 8-bit character encodings. Refer to
111
- < https://en.wikipedia.org/wiki/ISO/IEC_8859 > for descriptions of the different parts of
112
- the standard.
75
+ [ ISO/IEC 8859 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859 ) for descriptions of the
76
+ different parts of the standard.
113
77
114
78
For a list of the characters in each part of the standard, refer to the following links:
115
79
116
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-1 >
117
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-2 >
118
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-3 >
119
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-4 >
120
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-5 >
121
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-6 >
122
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-7 >
123
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-8 >
124
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-9 >
125
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-10 >
126
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-11 >
127
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-13 >
128
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-14 >
129
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-15 >
130
- - < https://en.wikipedia.org/wiki/ISO/IEC_8859-16 >
80
+ - [ ISO/IEC 8859-1 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-1 )
81
+ - [ ISO/IEC 8859-2 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-2 )
82
+ - [ ISO/IEC 8859-3 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-3 )
83
+ - [ ISO/IEC 8859-4 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-4 )
84
+ - [ ISO/IEC 8859-5 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-5 )
85
+ - [ ISO/IEC 8859-6 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-6 )
86
+ - [ ISO/IEC 8859-7 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-7 )
87
+ - [ ISO/IEC 8859-8 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-8 )
88
+ - [ ISO/IEC 8859-9 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-9 )
89
+ - [ ISO/IEC 8859-10 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-10 )
90
+ - [ ISO/IEC 8859-11 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-11 )
91
+ - [ ISO/IEC 8859-13 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-13 )
92
+ - [ ISO/IEC 8859-14 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-14 )
93
+ - [ ISO/IEC 8859-15 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-15 )
94
+ - [ ISO/IEC 8859-16 ] ( https://en.wikipedia.org/wiki/ISO/IEC_8859-16 )
0 commit comments