From b70515792cb15c080717668bc5b0c9eed55fc9ef Mon Sep 17 00:00:00 2001 From: Peter Kruithof Date: Wed, 28 Mar 2012 14:45:17 +0300 Subject: Added codepoint function --- .functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.functions b/.functions index 67e64d6..ef32e3a 100644 --- a/.functions +++ b/.functions @@ -62,4 +62,9 @@ function escape() { function unidecode() { perl -e "binmode(STDOUT, ':utf8'); print \"$@\"" echo # newline +} + +# Get a character's unicode codepoint +function codepoint() { + perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))" } \ No newline at end of file -- cgit v1.2.3