-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
417 lines (372 loc) · 17.8 KB
/
index.html
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CMCL to Unicode birectional converter - PAThs: an ERC project</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<style>
@font-face {
font-family: Coptonew;
src: url("./fonts/COPT2.TTF");
}
@font-face {
font-family: Antinoou;
src: url("fonts/Antinoou.ttf");
}
.coptonew{
font-family: Coptonew;
}
.antinoou{
font-family: Antinoou;
}
.big{
font-size: 1.5em;
}
.uppercase{
text-transform: uppercase;
}
code{
white-space: nowrap;
}
.help-item-title{
margin-top: 50px;
}
.toc{
padding: 30px;
margin-top: 50px;
background: #f7f7f7;
border: 1px solid #ebebeb;
display: inline-block;
}
.padding-10{
padding: 10px;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<h1>CMCL to Unicode bidirectional converter</h1>
<hr>
<div class="row">
<div class="col-sm-6">
<h3>CMCL</h3>
<label for="upload-cmcl">
<span class="btn btn-info"><i class="glyphicon glyphicon-upload"></i> Upload a file</span>
</label>
<input type="file" name="file" class="hidden" id="upload-cmcl">
<hr>
<label for="cmcl">CMCL source</label>
<textarea id="cmcl" class="form-control" style="height: 300px;">efparakalei
m-mofnqen-o&usovrastante;
aggelosef
jwm-mosjema
rei:m-pyamma
ten-nauerok
n-kesop.&3n;
m_n
a&5n;b
a&5?;b
a&?cap;b
a&3b;b
a&a?;b
a&coppa;b
a&ebol_compresso;b
a&Hspir;b
a&.b;b</textarea>
<div class="row">
<div class="col-xs-8">
<button class="btn btn-success btn-block tounicode">Convert to Unicode <i class="glyphicon glyphicon-arrow-right"></i></button>
</div>
<div class="col-xs-4">
<button class="btn btn-warning btn-block cmcldebug">View Unicode values <i class="glyphicon glyphicon-eye-open"></i></button>
</div>
</div>
<hr>
<label for="ccmclrendermcl">Coptonew output</label>
<pre id="cmclrender" class="coptonew"></pre>
</div>
<div class="col-sm-6">
<h3>Unicode</h3>
<label for="upload-uc">
<span class="btn btn-info"><i class="glyphicon glyphicon-upload"></i> Upload a file</span>
</label>
<input type="file" name="file" class="hidden" id="upload-uc">
<hr>
<label for="unicode">Unicode source</label>
<textarea id="unicode" class="form-control antinoou" style="height: 300px;"></textarea>
<div class="row">
<div class="col-xs-8">
<button class="btn btn-success btn-block tocmcl"><i class="glyphicon glyphicon-arrow-left"></i> Convert to CMCL</button>
</div>
<div class="col-xs-4">
<button class="btn btn-warning btn-block ucdebug">View Unicode values <i class="glyphicon glyphicon-eye-open"></i></button>
</div>
</div>
<hr>
<label for="unicoderender">Unicode output</label>
<pre id="unicoderender" class="antinoou"></pre>
</div>
</div>
<hr>
<div class="help">
<h2>Help and documentation</h2>
<div id="toc">
</div>
<div class="help-item">
<h3 class="help-item-title">Unicode Coptic superlinear stroke best practices</h3>
<ul>
<li>Single-letter superlinear stroke <strong>must</strong> be rendered with combining <code>U+0304</code>.
<pre><span class="antinoou">ⲁ̄</span> = U+2C81 U+0304 <a href="https://r12a.github.io/uniview/?charlist=ⲁ̄" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
</li>
<li>Conjoining superlinear stroke (alias “Bindestrich”) <strong>must</strong> be rendered using combining <code>U+FE24</code> after first character and <code>U+FE25</code> after last character.
<pre><span class="antinoou">ⲓ︤ⲥ︥</span> = U+2C93 U+FE24 U+2CA5 U+FE25 <a href="https://r12a.github.io/uniview/?charlist=ⲓ︤ⲥ︥" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
If the <em>Bindestrich</em> covers more than two characters, the in-between character(s) should be followed by <code>U+FE26</code>
<pre><span class="antinoou">ⲓ︤ⲏ︦ⲙ︥</span> = U+2C93 U+FE24 U+2C8F U+FE26 U+2C99 U+FE25 <a href="https://r12a.github.io/uniview/?charlist=ⲓ︤ⲏ︦ⲙ︥" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
</li>
<li>A single-letter superlinear stroke that is just as wide as the letter above which it is placed and also to be able to join two such single-letter strokes into a <em>Bindestrich</em> over 2 or more letters, it <strong>might</strong> be rendered with <code>U+0305</code>. <strong>This practice is not recommended and should be explicitly declared</strong>.
<pre><span class="antinoou">ⲁ̅</span> = U+2C81 U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲁ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
<pre><span class="antinoou">ⲓ̅ⲥ̅</span> = U+2C93 U+0305 U+2CA5 U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲓ̅ⲥ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
<pre><span class="antinoou">ⲓ̅ⲏ̅ⲙ̅</span> = U+2C93 U+0305 U+2C8F U+0305 U+2C99 U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲓ̅ⲏ̅ⲙ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
</li>
<li>The correct use of <code>U+0305</code> <strong>must</strong> be that of marking letters as numerals.
<pre><span class="antinoou">ⲁ̅</span> = U+2C81U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲁ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
<pre><span class="antinoou">ⲃ̅</span> = U+2C83U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲃ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
<pre><span class="antinoou">ⲅ̅</span> = U+2C85U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲅ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
<pre><span class="antinoou">ⲇ̅</span> = U+2C87U+0305 <a href="https://r12a.github.io/uniview/?charlist=ⲇ̅" target="_blank" class="btn btn-default btn-xs pull-right">?</a></pre>
</li>
</ul>
<p class="bg-warning padding-10"><strong>Pay attention</strong>: <code>U+0305</code> is very similar to <code>U+FE26</code> (at least in Antinoou font), but these two strokes<strong>must not</strong> be mixed up and their use <strong>must not</strong> be confused!</p>
</div>
<div class="help-item">
<h3 class="help-item-title">Caveats, known issues and “won't-fixes”</h3>
<p>Special attention must be paid to diacritics, particularly to superlinear strokes (see above).
The converter will properly work and promptly guess the correct form to use
in most cases if conversion <strong>from</strong> cmcl <strong>to</strong>
unicode is performed.
But it will <strong>fail</strong> to correctly convert the way back, specially in most complex cases.</p>
<p>For example, CMCL <code>a_</code> (Coptonew: <span class="coptonew">a_</span>) will
be correctly converted to Antinoou: <span class="antinoou">ⲁ̄</span> (Unicode <code>U+2C81 U+304</code>),
but it will not work the way back. Antinoou: <span class="antinoou">ⲁ̄</span>
(Unicode <code>U+2C81 U+304</code>) will be converted to CMCL <code>a+</code>
(Coptonew: <span class="coptonew">a+</span>). This should not be considered a bug and no fix will be provided in the future.</p>
<p>The same is true for other combinations, eg:</p>
<table class="table table-bordered table-striped table-hover table-condensed">
<thead>
<tr>
<th>CMCL (Coptonew)</th>
<th></th>
<th>Antinoou (Unicode)</th>
<th></th>
<th>CMCL (Coptonew)</th>
</tr>
</thead>
<tbody>
<script type="text/javascript">
var ie = [
{'c':'a_', 'a': 'ⲁ̄', 'u': 'U+2C81 U+304', 'cb': 'a+'},
{'c':'a_a', 'a': 'ⲁ︤ⲁ', 'u': 'U+2C81 U+FE24 U+2C81', 'cb': 'a︤a'},
{'c':'a_a_', 'a': 'ⲁ︤ⲁ︥', 'u': 'U+2C81 U+FE24 U+2C81 U+FE25', 'cb': 'a︤a︥'},
{'c':'a_a_a_', 'a': 'ⲁ︤ⲁ︦ⲁ︥', 'u': 'U+2C81 U+FE24 U+2C81 U+FE26 U+2C81 U+FE25', 'cb': 'a︤a_a︥'},
{'c':'D', 'a': 'ⲡ︤ⲛ︦ⲁ︥', 'u': 'U+2CA1 U+FE24 U+2C9B U+FE26 U+2C81 U+FE25', 'cb': 'D'},
{'c':'p_n_a_', 'a': 'ⲡ︤ⲛ︦ⲁ︥', 'u': 'U+2CA1 U+FE24 U+2C9B U+FE26 U+2C81 U+FE25', 'cb': 'D'}
];
ie.forEach(function(e){
document.write('<tr> '+
'<td>' + e.c + ' (<span class="coptonew">' + e.c + '</span>)</td> '+
'<td><code>=></code></td>' +
'<td> <span class="antinoou">' + e.a + '</span> (' + e.u + ')</td> '+
'<td><code>=></code></td>' +
'<td>' + e.cb + ' (<spanc class="coptonew">' + e.cb + '</span>)</td> '+
'</tr>');
});
</script>
</tbody>
</table>
</div>
<div class="help-item">
<h2 class="help-item-title">Coptonew <em>nomina sacra</em> shortcuts</h2>
<table class="table table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th>ASCII shortcut</th>
<th>Unicode output</th>
<th></th>
</tr>
</thead>
<tbody>
<script>
var map = {
'M': 'ⲗ︤ⲏ︦ⲙ︥',
'N': 'ⲙ︤ⲛ︦ⲧ︥',
'X': 'ⲓ︤ⲏ︦ⲙ︥',
'L': 'ϫ︤ⲥ︥',
'D': 'ⲡ︤ⲛ︦ⲁ︥',
'F': 'ⲏ︤ⲥ︥',
'G': 'ⲭ︤ⲣ︦ⲥ︥',
'O': 'ⲫ︤ⲑ︥',
'I': 'ⲓ︤ⲏ︦ⲥ︥',
'K': 'ⲓ︤ⲱ︦ⲥ︥',
'E': 'ⲓ︤ⲥ︥',
'Q': 'ⲥ︤ⲏ︦ⲣ︥',
'U': 'ⲟⲩ',
'W': 'ⲓ︤ⲏ︦ⲗ︥'
};
for(var k in map){
document.write('<tr>' +
'<td>' + k + '</td>' +
'<td class="antinoou">' + map[k] + '</td>' +
'<td><a href="https://r12a.github.io/uniview/?charlist=' + map[k] + '" target="_blank" class="btn btn-default btn-xs">More information</a></td>' +
'</tr>');
}
</script>
</tbody>
</table>
</div>
<div class="help-item">
<h2 class="help-item-title">CMCL's entities</h2>
<table class="table table-condensed table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Regex</th>
<th>Verbose explanation</th>
<th>Meaning</th>
<th>Replace policy</th>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&([0-9]{1,2})n;</code></td>
<td>an integer of one or two digits followed by n</td>
<td>Lacuna of known length</td>
<td>plus-minus (±, U+00B1) character followed by the number of missing characters, enclosed by brackets</td>
<td><code>&2n;</code> = <code>[±2]</code></td>
</tr>
<tr>
<td><code>&([0-9]{1,2})\?;</code></td>
<td>an integer of one or two digits followed by ?</td>
<td>Lacuna of supposed length</td>
<td>space and dot repeted the supposed length, enclosed by parentheses</td>
<td><code>&2?;</code> = <code>( . .)</code></td>
</tr>
<tr>
<td><code>&\?(cap|capitale);</code></td>
<td>? followed by string cap or capitale</td>
<td>Unknown capital character</td>
<td>space followed by dot (same output as entity <code>&1?;</code>)</td>
<td><code>&?cap;</code> = <code> .</code></td>
</tr>
<tr>
<td><code>&[0-9]{1,2}b;</code></td>
<td>an integer of one or two digits followed by question mark</td>
<td>Blank space of known length</td>
<td>Not to be rendered</td>
<td><code>&2b;</code> = <code></code></td>
</tr>
<tr>
<td><code>&([a-z]{1})\?;</code></td>
<td>one alphabetic character followed by question mark</td>
<td>Uncertain alphabetic character</td>
<td>The alphabetic character followed by subliteral dot (U+0323)</td>
<td><code>&a?;</code> = <code>ạ</code></td>
</tr>
<tr>
<td><code>&coppa;</code></td>
<td>coppa string</td>
<td>Character coppa</td>
<td>Character coppa (U+03D9)</td>
<td><code>&coppa;</code> = <code>ϙ</code></td>
</tr>
<tr>
<td><code>&(basilios|Crs|Cs|eiote|<br>ekklHsia|fq|i:lHm|iHl|iHs|<br>ilHm|is|isrl|iws|js|monaCos|<br>oute|pna);</code></td>
<td>One of the following strings (comma separated): basilios, Crs, Cs, eiote, ekklHsia, fq, i:lHm, iHl, iHs, ilHm, is, isrl, iws, js, monaCos, oute, pna</td>
<td></td>
<td>The same string (CMCL encoding system) converted to Unicode</td>
<td><code>&ekklHsia;</code> = <code>ⲉⲕⲕⲗⲏⲥⲓⲁ</code></td>
</tr>
<tr>
<td><code>&ebol_compresso;</code></td>
<td>string: ebol_compresso</td>
<td>CMCL's ebol equivalent in Unicode</td>
<td>ⲉⲃⲟⲗ</td>
<td><code>&ebol_compresso;</code> = <code>ⲉⲃⲟⲗ</code></td>
</tr>
<tr>
<td><code>&etcompresso;</code></td>
<td>string: etcompresso</td>
<td>CMCL's et equivalent in Unicode</td>
<td>ⲉⲧ</td>
<td><code>&etcompresso;</code> = <code>ⲉⲧ</code></td>
</tr>
<tr>
<td><code>&Hspir;</code></td>
<td>string: Hspir</td>
<td>Heta with combining dot above (U+2C8F U+0307)</td>
<td>ⲏ̇</td>
<td><code>&Hspir;</code> = <code>ⲏ̇</code></td>
</tr>
<tr>
<td><code>&.b;</code></td>
<td></td>
<td>Simple dot</td>
<td>.</td>
<td><code>&.b;</code> = <code>.</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<hr />
<p><strong>cmcl2unicode</strong> is an open source software available for
<a href="https://github.com/paths-erc/cmcl2unicode" target="_blank">download or fork on GitHub</a>.
Please report any issue you might encounter
<a href="https://github.com/paths-erc/cmcl2unicode/issues" target="_blank">here</a>.</p>
<hr />
<h2>How to cite</h2>
<p>This software is archived in Zenodo. Please cite it by referring the DOI: <a href="10.5281/zenodo.76262299" title="Open DOI">10.5281/zenodo.76262299</a></p>
<p><a href="https://zenodo.org/badge/latestdoi/76262299"><img src="https://zenodo.org/badge/76262299.svg" alt="DOI"></a></p>
<hr />
<h2>PAThs<br><small>Tracking Papyrus and Parchment Paths. <a href="http://paths.uniroma1.it" target="_blank">http://paths.uniroma1.it</a></small></h2>
<p class="lead">An Archaeological Atlas of Coptic Literature
Literary Texts in their Geographical Context: Production, Copying, Usage, Dissemination and Preservation</p>
<hr />
</div>
<script src="js/Coptic.js?d=20170301"></script>
<script src="js/app.js?d=20170301"></script>
<script type="text/javascript">
var html = '<div class="toc">' +
'<h4>Table of Contents</h4>' +
'<ul>'
var els = document.getElementsByClassName('help-item-title');
for (var k in els) {
if (els.hasOwnProperty(k)) {
html += '<li><a href="#' + els[k].textContent.replace(/[\W_]+/g,"").toLowerCase() + '">' + els[k].textContent + '</a></li>'
els[k].innerHTML = '<a name="' + els[k].textContent.replace(/[\W_]+/g,"").toLowerCase() + '"></a>' + els[k].innerHTML;
}
}
html += '</ul></div>';
document.getElementById("toc").innerHTML = html;
</script>
<script>
if (window.location.hostname === 'localhost'){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-10461068-41', 'auto');
ga('send', 'pageview');
}
</script>
</body>
</html>