Added codepoint function

This commit is contained in:
Peter Kruithof
2012-03-28 14:45:17 +03:00
parent b78d8cfd2f
commit b70515792c
+5
View File
@@ -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(\"$@\"))"
}