e8382f508a60fa7ce5b51e44c334f5ffdc6dd453
[sheet.git] / charset.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'charset cheat sheet',
5         version => '1.0',
6         description => [
7                 "Reference sheet with all glyphs in common character encoding tables,",
8                 "and an overview of Unicode ranges and UTF-8 bytes.",
9         ],
10         keywords => [qw'
11                 charset codepage unicode ascii utf8 latin glyph character encoding
12                 reference common overview table
13         '],
14         stylesheet => [qw'light'],
15         data => [qw'charset-unicode.inc.pl charset-utf8.inc.pl'],
16 });
17
18 my @tablist = split m{/+}, $Request || 'default';
19
20 use List::Util qw( first pairmap pairfirst pairs );
21
22 :>
23 <h1>Character encodings</h1>
24
25 <p>
26 <:
27 if ($tablist[0] eq 'default') {
28         say "Overview of Unicode allocation and common latin code pages.";
29         say "Compare alternate charsets:";
30 }
31 else {
32         say "Charset comparison:";
33 }
34
35 sub optionlink {
36         my ($title, $href, $selected) = @_;
37         return sprintf(
38                 $selected ? '<strong>%s</strong>' : '<a href="%2$s">%s</a>',
39                 EscapeHTML($title), $href
40         );
41 }
42
43 print join " •\n", (
44         map {
45                 join " ·\n", pairmap {
46                         optionlink($b || ucfirst $a, '/charset'.($a && "/$a?compare"), $a eq $Request);
47                 } @{$_}
48         }
49         [
50                 iso      => 'ISO',
51                 win      => 'Windows',
52                 dos      => 'DOS',
53                 mac      => 'Apple',
54                 ebcdic   => 'EBCDIC',
55                 $tablist[0] eq 'default' ? () : ('' => 'common'),
56         ],
57         [
58                 westeur  => 'West',
59                 centeur  => 'Central',
60                 norteur  => 'North European',
61                 turkish  => 0,
62                 greek    => 0,
63                 cyrillic => 0,
64                 hebrew   => 0,
65         ],
66 );
67 :>.
68 </p>
69
70 <:
71 use POSIX qw( ceil );
72 use Shiar_Sheet::FormatChar;
73 my $glyphs = Shiar_Sheet::FormatChar->new;
74 my @request;
75
76 sub tabinput {
77         # generate character table(s)
78         my $input = shift or return;
79
80         state $ALIAS = {
81                 default    => [qw( u+0-639 utf-8+realsize iso-8859-1 iso-8859-15 cp1252 cp437 cp850 )],
82                 unicode    => [qw( uu+cols=32+realsize u+0-4095 u+4096-6319 u+6320-8191 )],
83                 us         => [qw( cp437 cp863 gsm0338 AdobeStandardEncoding )],
84                 ebcdic     => [qw( cp37 cp500 cp1047 posix-bc cp1026 cp875 )],
85                 iso        => [map {"iso-8859-$_"} 1 .. 11, 13 .. 16],
86                 dos        => [qw( cp437 cp865 cp861 cp860 cp863 cp850 cp857 cp852 cp775
87                                    cp737 cp869 cp866 cp855 cp862 cp864 )],
88                 aix        => [qw( cp1006 )],
89                 win        => [qw( cp1252 cp1250 cp1254 cp1257 cp1258 cp1253 cp1251 cp1255 cp1256 cp874 )],
90                 mac        => [qw( MacRoman MacRomanian MacRumanian MacCroatian MacCentralEurRoman MacTurkish MacIcelandic MacSami
91                                    MacGreek MacCyrillic MacHebrew MacArabic MacFarsi MacThai )],
92
93                 # languages
94                 westeur    => [qw( iso-8859-1 iso-8859-15 cp1252 iso-8859-14 cp850 hp-roman8 nextstep MacRoman )],
95                 centeur    => [qw( iso-8859-2 iso-8859-16 cp1250 cp852 MacRomanian MacCroatian MacCentralEurRoman )], # MacRumanian only for DB
96                 turkish    => [qw( iso-8859-9 iso-8859-3 cp1254 cp857 MacTurkish )],
97                 norteur    => [qw( baltic nordic )],
98                 baltic     => [qw( iso-8859-4 iso-8859-13 cp1257 cp775 )],
99                 nordic     => [qw( iso-8859-10 cp865 cp861 MacIcelandic MacSami )],
100                 cyrillic   => [qw( koi8-r koi8-u koi8-f iso-8859-5 cp1251 MacCyrillic cp866 cp855
101                                    U4 U2DE-2DF UA64-A69 U50-52 )], # MacUkrainian is broken
102                 arabic     => [qw( iso-8859-6 cp1256 MacArabic cp864 cp1006 MacFarsi
103                                    U6 U8A-8F+0-31+64 U75-77 )],
104                 greek      => [qw( iso-8859-7 cp1253 MacGreek cp737 cp869  U37-3F U1F )],
105                 hebrew     => [qw( iso-8859-8 cp1255 MacHebrew cp862  U59-5F )],
106                 thai       => [qw( iso-8859-11 cp874 MacThai )],
107                 vietnamese => [qw( viscii cp1258 MacVietnamese )],
108                 symbols    => [qw( symbol dingbats MacDingbats )],
109
110                 # iso-code shorthand
111                 1 => 'westeur',
112                 2 => 'centeur',
113                 3 => 'turkish',
114                 4 => 'baltic',
115                 5 => 'cyrillic',
116                 6 => 'arabic',
117                 7 => 'greek',
118                 8 => 'hebrew',
119                 9 => 'turkish',
120                 10 => 'nordic',
121                 11 => 'thai',
122         };
123         if (my $follow = $ALIAS->{$input}) {
124                 tabinput($_) for ref $follow ? @{$follow} : $follow;
125                 return;
126         }
127
128         state $visible = {'' => 1};  # all present tables
129         my %row = (offset => 0, cols => 16);
130         my $params = $input =~ s/[+](.*)\z// ? $1 : undef;
131
132         if (not defined $params) {
133                 state $INHERIT = {
134                         'cp437'       => ['cp850' => 0, 'ascii' => '0-31+128'], # ascii range overridden later
135                         'gsm0338'     => ['ascii' => '0-127'],
136                         'dingbats'    => ['' => '32-127+160'],
137                         'MacDingbats' => ['dingbats' => '128-159'],
138                         'AdobeZdingbat'=> ['MacDingbats' => '128-159'], # should be identical but maps to private use
139                         'symbol'      => ['' => '32-127+160'],
140                         'AdobeSymbol' => ['symbol' => '32-127+160', '' => '32-127+160'], # minor differences, irrelevant except for different '€'
141
142                         'iso-8859-2'  => ['iso-8859-1' => '160'],
143                         'iso-8859-3'  => ['iso-8859-1' => '160'], #TODO: also apply to iso-8859-9
144                         'iso-8859-4'  => ['iso-8859-2' => '160'],
145                         'iso-8859-5'  => ['iso-8859-1' => '160'],
146                         'iso-8859-6'  => ['cp1256' => '128', 'iso-8859-1' => '160'],
147                         'iso-8859-7'  => ['iso-8859-1' => '160'],
148                         'iso-8859-8'  => ['iso-8859-1' => '160'],
149                         'iso-8859-9'  => ['iso-8859-1' => '208-223+240'],
150                         'iso-8859-10' => ['iso-8859-4' => '160'],
151                         'iso-8859-11' => ['iso-8859-1' => '160'],
152                         'iso-8859-13' => ['iso-8859-4' => '160'],
153                         'iso-8859-14' => ['iso-8859-1' => '160'],
154                         'iso-8859-15' => ['iso-8859-1' => '160-191'],
155                         'iso-8859-16' => ['iso-8859-2' => '160'],
156                         'hp-roman8'   => ['iso-8859-1' => '160'],
157
158                         'cp1252'      => ['iso-8859-1' => '128-159'],
159                         'cp1250'      => ['iso-8859-2' => '128-191', 'cp1252' => '128'],
160                         'cp1254'      => ['iso-8859-9' => '128-159', 'cp1252' => '128-159+208'],
161                         'cp874'       => ['iso-8859-11' => '128-159', 'cp1252' => '128'], # windows-874 actually cp1162
162                         'cp1257'      => ['iso-8859-13' => '128-159+255', 'cp1252' => '128'],
163                         'cp1251'      => ['cp1252' => '128'],
164                         'cp1253'      => ['cp1252' => '128'],
165                         'cp1255'      => ['iso-8859-8' => '128-223', 'cp1252' => '128'],
166                         'cp1256'      => ['cp1252' => '128'],
167                         'cp1258'      => ['cp1252' => '128-159+192'],
168
169                         'cp850'       => ['cp437' => '144'],
170                         'cp860'       => ['cp437' => '128-175'],
171                         'cp861'       => ['cp865' => '128-175'],
172                         'cp863'       => ['cp437' => '128-175'],
173                         'cp865'       => ['cp437' => '144-175'],
174                         'cp852'       => ['cp850' => '128', 'cp437' => '128'],
175                         'cp857'       => ['cp850' => '128-175+208-239', 'cp437' => '128'],
176                         'cp775'       => ['cp850' => '128'],  # partial cp437
177                         'cp866'       => ['cp437' => '128-175+224'],
178                         'cp855'       => ['cp437' => '128'],
179                         'cp1006'      => ['iso-8859-6' => '160', 'cp437' => '128'],
180                         'cp737'       => ['cp437' => '128-175+224'],
181                         'cp869'       => ['cp437' => '128'],
182                         'cp862'       => ['cp437' => '128-159'],
183                         'cp864'       => ['MacArabic' => '128', 'iso-8859-6' => '128', 'cp437' => '128'], #TODO: compare form variants
184
185                         'koi8-u'      => ['koi8-r' => '144-191'],
186                         'koi8-f'      => ['koi8-u' => '144-191'],
187
188                         'MacRomanian' => ['MacRoman' => '160-191+208-223'],
189                         'MacRumanian' => ['MacRomanian' => '160-191+208-223', 'MacRoman' => '160-191+208-223'],
190                         'MacCroatian' => ['MacRoman' => '160'],
191                         'MacCentralEurRoman' => ['MacRoman' => '128'],
192                         'MacIcelandic'=> ['MacRoman' => '160-175+208-239'],
193                         'MacTurkish'  => ['MacRoman' => '208-223'], # F5 is unassigned
194                         'MacSami'     => ['MacIcelandic' => '144-191+208-223+240', 'MacRoman' => '144'],
195                         'MacGreek'    => ['MacRoman' => '128'],
196                         'MacCyrillic' => ['MacRoman' => '128'],
197                         'MacHebrew'   => ['iso-8859-8' => '128', 'MacRoman' => '128-143+160'], # partial ascii
198                         'MacArabic'   => ['iso-8859-6' => '128', 'cp864' => '128', 'MacRoman' => '128'], #TODO: multiple parents
199                         'MacFarsi'    => ['MacArabic' => '176-191', 'MacRoman' => '128'],
200
201                         'cp37'        => ['posix-bc' => '0'],
202                         'posix-bc'    => ['cp1047' => '64'],
203                         'cp500'       => ['cp37' => '64-95+176-191'],
204                         'cp1047'      => ['cp37' => '16-47+80-95+160-191'],
205                         'cp1026'      => ['cp37' => '64'],
206                         'cp875'       => ['cp37' => '48'],
207
208                 };
209
210                 my @parents = @{ $INHERIT->{$input} || [] };
211
212                 if (my ($parent, $part) = pairfirst { defined $visible->{$a} } @parents) {
213                         $row{parent} = $parent;
214                         $params = $part;
215                         $params = 128 unless $visible->{$parent}
216                                 or ($input eq 'MacCroatian' and defined $visible->{MacRomanian});
217                 }
218                 elsif (defined $visible->{ascii}) {
219                         $row{parent} = $parents[0];
220                         $params = $parents[1] // 128;
221                         $params = 128 if $params >= 128;  # ascii offset at most
222                 }
223                 elsif (@parents) {
224                         $row{parent} = $parents[0];
225                         $params = $parents[1] if $parents[1] == 0;  # apply ascii end
226                 }
227                 $visible->{$_} //= 0 for $row{parent} || ();
228         }
229
230         for my $param (split /[+]+/, $params // '') {
231                 if ($param eq 'realsize') {
232                         $row{realsize}++;
233                 }
234                 elsif ($param =~ m{ \A cols = (\d+) \z }x) {
235                         $row{cols} = $1;
236                 }
237                 elsif ($param =~ m{ \A (?<offset> \d+) (?: [-] (?<endpoint> \d+) )? \z }x) {
238                         if (defined $row{endpoint}) {
239                                 # extend earlier range
240                                 my $skip = int(($row{endpoint} || $row{offset}) / $row{cols});
241                                 for ($skip + 1 .. ($+{offset} / $row{cols}) - 1) {
242                                         $row{skip}->{ $_ * $row{cols} - $row{offset} }++;
243                                 }
244                         }
245                         else {
246                                 $row{offset} = $+{offset};
247                         }
248                         $row{endpoint} = $+{endpoint} || 0;
249                 }
250                 else {
251                         Alert("Unknown option <q>$param</q> for charset $input");
252                 }
253         }
254
255         if ($input =~ m{ \A u ([0-9a-f]+) (?:-([0-9a-f]+))? \z }ix) {
256                 my $start = hex($1) << ($2 ? 4 : 8);
257                 my $end = $2 ? (hex($2) << 4) + $row{cols} - 1 : $start + 255;
258                 $row{table} = join '', map { chr } $start .. $end;
259                 utf8::upgrade($row{table});  # prevent latin1 output
260                 $row{endpoint} = $end - $start;
261                 $row{set} = sprintf 'Unicode block U+%02Xxx', $start >> 8;
262                 $row{offset} = $start % 256;
263         }
264         elsif (lc $input eq 'uu') {
265                 $row{set} = 'Unicode planes';
266                 $row{cell} = do 'charset-ucplanes.inc.pl'
267                         or Alert('Table data could not be read', $@ || $!);
268                 $row{endpoint} = 1023 * $row{cell}->{colsize};
269         }
270         elsif (lc $input eq 'u') {
271                 $row{cell} = do 'charset-unicode.inc.pl'
272                         or Alert('Table data could not be read', $@ || $!);
273
274                 $row{endpoint} ||= 8191;
275                 $row{endpoint}  *= $row{cell}->{colsize};
276                 $row{startpoint} = $row{cell}->{colsize} * $row{offset};
277                 $row{offset} = 0;
278                 $row{set} = 'Unicode ' . (
279                         $row{startpoint} <  0x10000 && $row{endpoint} < 0x10000 ? 'BMP' :
280                         $row{startpoint} >= 0x10000 && $row{endpoint} < 0x20000 ? 'SMP' :
281                         'allocations'
282                 );
283         }
284         elsif ($input =~ m/^utf-*8$/i) {
285                 $row{set} = 'UTF-8';
286                 $row{cell} = do 'charset-utf8.inc.pl'
287                         or Alert('Table data could not be read', $@ || $!);
288                 $row{endpoint} = 255;
289         }
290         elsif ($row{set} = Encode::resolve_alias($input)) {
291                 $row{endpoint} ||= 255;
292                 if ($row{set} eq 'MacHebrew' or $row{set} eq 'MacThai') {
293                         # array of possibly multiple characters per code point
294                         $row{table} = [
295                                 map { Encode::decode($row{set}, pack 'C*', $_) } $row{offset} .. $row{endpoint}
296                         ];
297                 }
298                 else {
299                         # ~16x faster than decoding in loop;
300                         # substr strings is twice as fast as splitting to an array
301                         $row{table} = Encode::decode($row{set}, pack 'C*', $row{offset} .. $row{endpoint});
302                 }
303                 $row{endpoint} -= $row{offset};
304
305                 if ($row{set} eq 'cp437') {
306                         for my $phipos (237 - $row{offset}) {
307                                 next if $phipos < 0 or $phipos > $row{endpoint};
308                                 # replace phi glyph
309                                 substr($row{table}, $phipos, 1) = pack 'U*', 0x3D5;
310                         }
311                         if ($row{offset} == 0) {
312                                 # replace control characters by visible variants
313                                 substr($row{table}, 0, 32) = pack 'U*', map {hex} qw(
314                                         2007 263A 263B 2665 2666 2663 2660 2022
315                                         25D8 25CB 25D9 2642 2640 266A 266B 263C
316                                         25BA 25C4 2195 203C 00B6 00A7 25AC 21A8
317                                         2191 2193 2192 2190 221F 2194 25B2 25BC
318                                 );
319                         }
320                 }
321                 elsif ($row{set} eq 'symbol') {
322                         if ($row{offset} <= 0x60 and $row{endpoint} >= 0x60 - $row{offset}) {
323                                 # replace radical extender by closest unicode equivalent
324                                 substr($row{table}, 0x60 - $row{offset},  1) = '│';
325                         }
326                         if ($row{offset} <= 0xBD and $row{endpoint} >= 0xFF - $row{offset}) {
327                                 substr($row{table}, 0xBD - $row{offset},  2) = '⏐⎯'; # arrow extenders
328                                 substr($row{table}, 0xD2 - $row{offset},  3) = '®©™'; # serif variants
329                                 substr($row{table}, 0xE0 - $row{offset},  1) = '◊'; # replace lookalike, should match AdobeSymbol
330                                 substr($row{table}, 0xE2 - $row{offset},  3) = '®©™'; # sans-serif variants
331                                 substr($row{table}, 0xE6 - $row{offset}, 10) = '⎛⎜⎝⎡⎢⎣⎧⎨⎩⎪';
332                                 substr($row{table}, 0xF0 - $row{offset},  1) = '€';
333                                 substr($row{table}, 0xF4 - $row{offset}, 11) = '⎮⌡⎞⎟⎠⎤⎥⎦⎫⎬⎭';
334                         }
335                 }
336
337                 $visible->{ascii} =  # assume common base
338                 $visible->{ $row{set} } = 1;
339         }
340         else {
341                 Alert("Encoding <q>$input</q> unknown");
342                 return;
343         }
344         push @request, \%row;
345 }
346 tabinput($_) for @tablist;
347
348 my $NOCHAR = chr 0xFFFD;
349
350 sub range_cell {
351         my ($info, $offset) = @_;
352         my $table = $info->{cell} or return;
353         my $def = $table->{$offset} or return;
354         my ($len, $class, $name, $title) = @{$def};
355
356         my $cols = $info->{cols};
357         my $colsize = $table->{colsize} || 1;
358         my $attr = '';
359         $len /= $colsize;
360         $name //= $len <= 2 ? 'res' : 'reserved';
361
362         if (my $part = $offset/$colsize % $cols) {
363                 # continued row
364                 my $rest = $cols - $part;  # remaining
365                 $rest = $len if $len < $rest; #TODO: optimise
366                 if ($len -= $rest) {
367                         # continued on new row
368                         my @next = ($len * $colsize, "$class joinu");
369                         my $separate = $cols - $len > $rest;  # columns not on next row
370                         if ($len > $rest) {
371                                 # minority remains
372                                 push @next, $name, $title;
373                                 $title ||= $name;
374                                 $name = $separate && '…';
375                         }
376                         else {
377                                 # minority on next row
378                                 push @next, $separate && '"', $title || $name;
379                         }
380                         $table->{$offset + $colsize*$rest} //= \@next;
381                         $class .= ' joind';
382                 }
383                 $len = $rest;
384         }
385         elsif (my $rows = int($len / $cols)) {
386                 # multiple full rows
387                 my $rowsize = $colsize * $cols;
388                 if ($len -= $rows * $cols) {
389                         # partial row remains
390                         $table->{$offset + $rowsize * $rows} //= [$len*$colsize, "$class joinu", '', $title];
391                         $class .= ' joind';
392                 }
393
394                 unless ($info->{realsize}) {
395                         # coalesce multiple rows
396                         while ($rows > 3) {
397                                 $info->{skip}->{$offset += $rowsize}++;
398                                 $rows--;
399                         }
400                         if ($rows > 2) {
401                                 $info->{skip}->{$offset += $rowsize} = 0;
402                         }
403                 }
404
405                 $attr .= sprintf ' rowspan=%d', $rows;
406                 $len = $cols;
407         }
408
409         $attr .= sprintf ' colspan=%d', $len unless $len == 1;
410         $attr .= $1 if $class and $class =~ s/( \w+="[^"]*")//;
411         $attr .= sprintf ' class="%s"', $class if $class;
412         $attr .= sprintf ' title="%s"', EscapeHTML($title) if $title;
413         return "<td$attr>$name\n";
414 }
415
416 for my $row (@request) {
417         my $cols = $row->{cols};
418         my $colsize = $row->{cell} && $row->{cell}->{colsize} || 1;
419         my $coldigits = ceil(log($colsize * $cols) / log(16));  # uniform length of hexadecimal header
420         my $rowdiv = 16 ** $coldigits;  # row divide for column digits
421         $rowdiv = 1 if $rowdiv != $cols * $colsize;  # divide only if all columns are matched
422         my $offset = $row->{startpoint} || 0;
423
424         printf '<div class="section"><table class="glyphs%s">', !$row->{cell} && ' charmap';
425         my $title = $row->{set};
426         $title .= " <aside>(over $_)</aside>"
427                 for grep { $_ ne 'iso-8859-1' } $row->{parent} // ();
428         printf '<caption>%s</caption>', $title;
429         print '<col>' x ($cols + 1);
430         for my $section (qw{thead}) {
431                 print "<$section><tr><th>", $rowdiv == 1 ? '+' : '↱';
432                 printf '<th>%0*X', $coldigits, $_ * $colsize for 0 .. $cols - 1;
433                 print "\n";
434         }
435         print '<tbody>';
436         while ($offset < $row->{endpoint}) {
437                 if ($row->{skip}->{$offset}) {
438                         $offset += $cols * $colsize;
439                         next;
440                 }
441
442                 print '<tr><th>';
443                 if (defined $row->{skip}->{$offset}) {
444                         print '⋮';
445                 }
446                 else {
447                         if (my $rowmod = $offset % $rowdiv) {
448                                 # offset in column units
449                                 printf '<small>+%X</small>', $rowmod;
450                         }
451                         else {
452                                 # divided row offset
453                                 printf '%X', ($offset + $row->{offset}) / $rowdiv;
454                         }
455                 }
456                 say '';
457
458                 for (1 .. $cols) {
459                         if ($row->{cell}) {
460                                 print range_cell($row, $offset);
461                                 next;
462                         }
463
464                         my $cp = $offset + $row->{offset};
465                         my $glyph = ref $row->{table} eq 'ARRAY' ? $row->{table}->[$offset] :
466                                 substr $row->{table}, $offset, 1;
467                         my ($cell, $name, $class) = $glyph eq $NOCHAR ? () :
468                                 $glyphs->glyph_html($glyph);
469
470                         if (exists $get{compare}) {
471                                 state $visible = {};
472                                 $class = (
473                                         $cp == ord $glyph ? 'l4' :
474                                         $row->{parent} && $glyph eq
475                                                 Encode::decode($row->{parent}, pack 'C', $cp) ? 'l3' :
476                                         !$class ? undef :
477                                         $visible->{$glyph} ? 'l2' :
478                                         'l1'
479                                 );
480                                 $visible->{$glyph}++;
481                         }
482
483                         say sprintf $class ? '<td title="%s" class="X %s">%s' : '<td title="%s">',
484                                 $name, $class, $cell;
485                 }
486                 continue {
487                         $offset += $colsize;
488                 }
489         }
490         say '</table></div>';
491 }
492
493 :>
494 <hr>
495
496 <div class="legend">
497         <table class="glyphs"><tr><: if (exists $get{compare}) { :>
498         <td class="X l4">unicode
499         <td class="X l3">inherited
500         <td class="X l2">existing
501         <td class="X l1">original
502         <td class="">unassigned
503 <: } else { :>
504         <td class="X Cc">control
505         <td class="X Zs"><span>whitespace</span>
506         <td class="X Mn">diacritic<table class="glyphs"><tr>
507                 <td class="X Sk">letter
508                 </table>
509         <td class="X Po">punctuation<table class="glyphs"><tr>
510                 <td class="X Pf">quote
511                 </table>
512         <td class="X So">symbol<table class="glyphs"><tr>
513                 <td class="X Sm">math
514                 <td class="X Sc">currency
515                 </table>
516         <td class="X No">numeric
517         <td class="X Greek">greek<table class="glyphs"><tr>
518                 <td class="X Latin">latin
519                 <td class="X Cyrillic">cyrillic
520                 </table>
521         <td class="X Aramaic">aramaic<table class="glyphs"><tr>
522                 <td class="X Brahmic">brahmic
523                 <td class="X Arabic">arabic
524                 </table>
525         <td class="X Syllabic">syllabic<table class="glyphs"><tr>
526                 <td class="X African">african
527                 <td class="X Hiragana">japanese
528                 <td class="X Han">cjk
529                 <td class="X Bopomofo">chinese
530                 </table>
531         <td class="X Alpha">alphabetic
532         </table>
533
534         <table class="glyphs"><tr>
535         <td class="X">unicode 7.0
536         <td class="X Xr">proposed
537         <td class="X Xd">deprecated
538         <td class="">unassigned
539         <td class="X Xi">invalid
540 <: } :> </table>
541 </div>
542