char-utf.mkiv /size: 1480 b    last modification: 2020-07-01 14:35
1%D \module
2%D   [       file=char-utf,
3%D        version=2006.12.05,
4%D          title=\CONTEXT\ Character Support,
5%D       subtitle=Unicode UTF,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Character Support / Unicode UTF}
15
16%D After a bit of experimenting we reached a clean state where \UTF\
17%D 8, 16 and 32 were supported as well as collapsing (combining
18%D sequences). Writing the code was a relaxed experience, not in the
19%D last place because it was accompanied by listening to those nice
20%D Vienna Teng cd's (who decided that making music was more fun than
21%D programming, but then, she may not know \TEX\ and \LUA).
22
23\unprotect
24
25\registerctxluafile{char-def}{}
26\registerctxluafile{char-ini}{}
27\registerctxluafile{char-utf}{}
28\registerctxluafile{char-cjk}{}
29
30%D We enable collapsing (combining characters) by default, but
31%D since the source files are rather simple, we postpone the
32%D initialization till runtime.
33
34% \appendtoks
35%     \clf_enableutf % not needed when we create a format so we do it now
36% \to \everyjob
37
38%D The next one influences input parsing.
39%D
40%D \starttyping
41%D \definecomposedutf 318 108 126 % lcaron
42%D \stoptyping
43
44\unexpanded\def\definecomposedutf#1 #2 #3 %
45  {\clf_addgrapheme{#1}{#2}{#3}}
46
47\protect
48