-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfendo.addon.ql_charset.fs
200 lines (183 loc) · 6.03 KB
/
fendo.addon.ql_charset.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
.( fendo.addon.ql_charset.fs) cr
\ This file is part of Fendo
\ (http://programandala.net/en.program.fendo.html).
\ This file is the Sinclair QL source code addon.
\ Last modified 202011160218.
\ See change log at the end of the file.
\ Copyright (C) 2013,2017 Marcos Cruz (programandala.net)
\ Fendo is free software; you can redistribute it and/or modify it
\ under the terms of the GNU General Public License as published by
\ the Free Software Foundation; either version 2 of the License, or
\ (at your option) any later version.
\ Fendo is distributed in the hope that it will be useful, but WITHOUT
\ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
\ License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program; if not, see <http://gnu.org/licenses>.
\ Fendo is written in Forth (http://forth-standard.org)
\ with Gforth (http://gnu.org/software/gforth).
\ ==============================================================
forth_definitions
require galope/uncodepaged.fs
fendo_definitions
\ Reference:
\ http://web.archive.org/web/20080907083614/http://pages.zoom.co.uk/selsyn/ql/qlchar.html
uncodepage: ql_charset_to_html
\ Translation table from the Sinclair QL charset
\ to HTML entities.
\ 0x22 s" "" \ double quotes
0x60 s" £" \ British pound sterling
0x7F s" ©" \ copyright
0x7E s" ˜" \ '~'
0x80 s" ä" \ a umlaut
0x81 s" ã" \ a tilde
0x82 s" å" \ a ring
0x83 s" é" \ e acute
0x84 s" ö" \ o umlaut
0x85 s" õ" \ o tilde
0x86 s" ø" \ o slash
0x87 s" ü" \ u umlaut
0x88 s" ç" \ c cedilla
0x89 s" ñ" \ n tilde
0x8A s" æ" \ ae ligature (ash)
0x8B s" œ" \ oe ligature (ethel)
0x8C s" á" \ a acute
0x8D s" à" \ a grave
0x8E s" â" \ a circumflex
0x8F s" ë" \ e umlaut
0x90 s" è" \ e grave
0x91 s" ê" \ e circumflex
0x92 s" ï" \ i umlaut
0x93 s" í" \ i acute
0x94 s" ì" \ i grave
0x95 s" î" \ i circumflex
0x96 s" ó" \ o acute
0x97 s" ò" \ o grave
0x98 s" ô" \ o circumflex
0x99 s" ú" \ u acute
0x9A s" ù" \ u grave
0x9B s" û" \ u circumflex
0x9C s" ß" \ Greek beta / eszett
0x9D s" ¢" \ cent
0x9E s" ¥" \ yen
0x9F s" `" \ backtick
0xA0 s" Ä" \ A umlaut
0xA1 s" Ã" \ A tilde
0xA2 s" Å" \ A ring
0xA3 s" É" \ E acute
0xA4 s" Ö" \ O umlaut
0xA5 s" Õ" \ O tilde
0xA6 s" Ø" \ O slash
0xA7 s" Ü" \ U umlaut
0xA8 s" Ç" \ C cedilla
0xA9 s" Ñ" \ N tilde
0xAA s" Æ" \ AE ligature
0xAB s" Œ" \ OE ligature
0xAC s" α" \ Greek alpha
0xAD s" δ" \ Greek delta
0xAE s" θ" \ Greek theta
0xAF s" λ" \ Greek lambda
0xB0 s" μ" \ Greek mu
0xB1 s" π" \ Greek pi
0xB2 s" χ" \ Greek phi
0xB3 s" ¡" \ inverted !
0xB4 s" ¿" \ inverted ?
0xB5 s" ƨ̣" \ reversed S with dot below
0xB6 s" §" \ section
0xB7 s" ¤" \ generic currency
0xB8 s" «" \ left angle quote
0xB9 s" »" \ right angle quote
0xBA s" °" \ ring or deegre
0xBB s" ÷" \ divide sign
0xBC s" ←" \ arrow left
0xBD s" →" \ arrow right
0xBE s" ↑" \ arrow up
0xBF s" ↓" \ arrow down
;uncodepage
uncodepage: ql_charset_to_utf8
\ Translation table from the Sinclair QL charset
\ to UTF-8.
0x60 s" £" \ British pound sterling
0x7F s" ©" \ copyright
0x7E s" ~" \ tilde
0x80 s" ä" \ a umlaut
0x81 s" ã" \ a tilde
0x82 s" å" \ a ring
0x83 s" é" \ e acute
0x84 s" ö" \ o umlaut
0x85 s" õ" \ o tilde
0x86 s" ø" \ o slash
0x87 s" ü" \ u umlaut
0x88 s" ç" \ c cedilla
0x89 s" ñ" \ n tilde
0x8A s" æ" \ ae ligature (ash)
0x8B s" œ" \ oe ligature (ethel)
0x8C s" á" \ a acute
0x8D s" à" \ a grave
0x8E s" â" \ a circumflex
0x8F s" ë" \ e umlaut
0x90 s" è" \ e grave
0x91 s" ê" \ e circumflex
0x92 s" ï" \ i umlaut
0x93 s" í" \ i acute
0x94 s" ì" \ i grave
0x95 s" î" \ i circumflex
0x96 s" ó" \ o acute
0x97 s" ò" \ o grave
0x98 s" ô" \ o circumflex
0x99 s" ú" \ u acute
0x9A s" ù" \ u grave
0x9B s" û" \ u circumflex
0x9C s" ß" \ Greek beta / eszett
0x9D s" ¢" \ cent
0x9E s" ¥" \ yen
0x9F s" `" \ backtick
0xA0 s" Ä" \ A umlaut
0xA1 s" Ã" \ A tilde
0xA2 s" Å" \ A ring
0xA3 s" É" \ E acute
0xA4 s" Ö" \ O umlaut
0xA5 s" Õ" \ O tilde
0xA6 s" Ø" \ O slash
0xA7 s" Ü" \ U umlaut
0xA8 s" Ç" \ C cedilla
0xA9 s" Ñ" \ N tilde
0xAA s" Æ" \ AE ligature
0xAB s" Œ" \ OE ligature
0xAC s" α" \ Greek alpha
0xAD s" δ" \ Greek delta
0xAE s" θ" \ Greek theta
0xAF s" λ" \ Greek lambda
0xB0 s" μ" \ Greek mu
0xB1 s" π" \ Greek pi
0xB2 s" χ" \ Greek phi
0xB3 s" ¡" \ inverted !
0xB4 s" ¿" \ inverted ?
0xB5 s" ƨ̣" \ reversed S with dot below (U+01A8 and U+0323 combined) \ XXX Note: this doesn't look right with Vimprobable, but yes with Midori.
0xB6 s" §" \ section
0xB7 s" ¤" \ generic currency
0xB8 s" «" \ left angle quote
0xB9 s" »" \ right angle quote
0xBA s" °" \ ring or deegre
0xBB s" ÷" \ divide sign
0xBC s" ←" \ arrow left
0xBD s" →" \ arrow right
0xBE s" ↑" \ arrow up
0xBF s" ↓" \ arrow down
;uncodepage
.( fendo.addon.ql_charset.fs compiled) cr
\ ==============================================================
\ Change log {{{1
\ 2013-12-10: Written with <galope/translated.fs>.
\
\ 2013-12-12: Rewritten with <galope/uncodepaged.fs>.
\
\ 2014-10-24: Solution for the QL char 0xB5: Unicode chars U+01A8 and U+0323 combined.
\
\ 2014-10-24: Reference URL no longer exists; updated to a copy in web.archive.org.
\
\ 2017-06-22: Update source style, layout and header.
\
\ 2018-12-08: Update notation of Forth words in comments and strings.
\ vim: filetype=gforth