commit: 9ce0b8ce4e610b9ce4302227ffa5935431bc0a62
parent 8fbf50c09bd00d03bb7d4f8c629071d1b5b278fd
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 18 Feb 2021 23:17:28 +0100
.common.sh: Fix wtf_unicode
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.common.sh b/.common.sh
@@ -132,9 +132,8 @@ grep_unicode() {
grep "$1" /usr/share/unicode-data/UnicodeData.txt | awk -F\; '{ system("unicode -t "$1); print FS "U+"$1 FS $2 }' | column -s\; -t
}
wtf_unicode() {
- wat_unicode $(unicode -h "$1")
+ unicode -n "$1" | tr 'abcdef' 'ABCDEF' | while read char; do wat_unicode $char; done
}
-
wat_unicode() {
awk -F\; '{ if($1 == "'${1}'"){print "U+"$1 FS $2} }' /usr/share/unicode-data/UnicodeData.txt
}