diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/emotion/emotion.lua')
-rw-r--r-- | Master/texmf-dist/tex/latex/emotion/emotion.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/emotion/emotion.lua b/Master/texmf-dist/tex/latex/emotion/emotion.lua new file mode 100644 index 00000000000..bde272c2b58 --- /dev/null +++ b/Master/texmf-dist/tex/latex/emotion/emotion.lua @@ -0,0 +1,21 @@ +function unicodes(chs) + local text = "" + for _, c in utf8.codes(chs) do + text = text .. unicode(c) + end + print(text) +end + +function unicode(codepoint) + local value = NULL + if codepoint > 0xFFFF then + value = string.format("^^^^^^%06x", codepoint) + elseif codepoint > 0xFF then + value = string.format("^^^^%04x", codepoint) + else + value = string.format("^^%02x", codepoint) + end + return value +end + +unicodes("🀁♀")
\ No newline at end of file |