Uni()

From LING073
Revision as of 19:09, 2 February 2024 by Jwashin1 (talk | contribs) (Created page with "To get the codepoints of typed or copied characters, a simple command can be defined on a terminal. uni(){ c=$(cat); for((i=0;i<${#c};i++)); do printf "<U%04X>" "'${c:i:1}"...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To get the codepoints of typed or copied characters, a simple command can be defined on a terminal.

 uni(){ c=$(cat); for((i=0;i<${#c};i++)); do printf "<U%04X>" "'${c:i:1}"; done; }


To use the command, do something like this:

 $ echo ä | uni