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\ 8, 16 and 32 17%D were supported as well as collapsing (combining sequences). Writing the code was 18%D a relaxed experience, not in the last place because it was accompanied by 19%D listening to those nice Vienna Teng cd's (who decided that making music was more 20%D fun than programming, but then, she may not know \TEX\ and \LUA). 21 22\unprotect 23 24\registerctxluafile{char-def}{} 25\registerctxluafile{char-ini}{} 26\registerctxluafile{char-utf}{} 27\registerctxluafile{char-cjk}{} 28 29%D We enable collapsing (combining characters) by default, but since the source 30%D files are rather simple, we postpone the initialization till runtime. 31 32% \appendtoks 33% \clf_enableutf % not needed when we create a format so we do it now 34% \to \everyjob 35 36%D The next one influences input parsing. 37%D 38%D \starttyping 39%D \definecomposedutf 318 108 126 % lcaron 40%D \stoptyping 41 42\permanent\protected\def\definecomposedutf#1 #2 #3 {\clf_addgrapheme{#1}{#2}{#3}} 43 44\protect 45 |