diff options
author | Mathias Bynens <mathias@qiwi.be> | 2012-03-28 04:55:03 -0700 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-03-28 04:55:03 -0700 |
commit | e74cbc17cffc01021725cdaee16efd30c8135af4 (patch) | |
tree | 8497920e2e90446e101bd1e973747a308efd651b | |
parent | b78d8cfd2f1e003228df9d4331e89e711f03dbec (diff) | |
parent | a514cb3adf7002811de473177d385723b23fe5b4 (diff) | |
download | dotfiles-e74cbc17cffc01021725cdaee16efd30c8135af4.tar.gz dotfiles-e74cbc17cffc01021725cdaee16efd30c8135af4.tar.bz2 dotfiles-e74cbc17cffc01021725cdaee16efd30c8135af4.zip |
Merge pull request #44 from pkruithof/patch-1
.functions: Add `codepoint` function
$ codepoint €
U+20AC
$ codepoint ð
U+00F0
-rw-r--r-- | .functions | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -62,4 +62,10 @@ 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(\"$@\"))" + echo # newline }
\ No newline at end of file |