Permalink
Browse files

Added codepoint function

  • Loading branch information...
1 parent b78d8cf commit b70515792cb15c080717668bc5b0c9eed55fc9ef @pkruithof pkruithof committed Mar 28, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 .functions
View
5 .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(\"$@\"))"
}

0 comments on commit b705157

Please sign in to comment.