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 From a514cb3adf7002811de473177d385723b23fe5b4 Mon Sep 17 00:00:00 2001 From: Peter Kruithof Date: Wed, 28 Mar 2012 14:48:16 +0300 Subject: Added newline after codepoint --- .functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.functions b/.functions index ef32e3a..900df56 100644 --- a/.functions +++ b/.functions @@ -66,5 +66,6 @@ function unidecode() { # Get a character's unicode codepoint function codepoint() { - perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))" + perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))" + echo # newline } \ No newline at end of file -- cgit v1.2.3