unic-ini.lmt /size: 743 b    last modification: 2024-01-16 10:22
1if not modules then modules = { } end modules ['unic-ini'] = {
2    version   = 1.001,
3    comment   = "companion to unic-ini.mkiv",
4    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5    copyright = "PRAGMA ADE / ConTeXt Development Team",
6    license   = "see context related readme files"
7}
8
9local context = context
10local utfchar = utf.char
11
12-- Beware, initializing unicodechar happens at first usage and takes
13-- 0.05 -- 0.1 second (lots of function calls).
14
15interfaces.implement {
16    name      = "unicodechar",
17    public    = true,
18    protected = true,
19    arguments = "argument",
20    actions   = function(asked)
21        local n = characters.unicodechar(asked)
22        if n then
23            context(utfchar(n))
24        end
25    end
26}
27