summaryrefslogtreecommitdiff
path: root/.local/bin/uni
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-07 17:15:16 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-07 17:15:16 +0200
commit64e2e90abdca04743558e3baf42a6b714b440bd0 (patch)
treec96cbae44db45d890bb37417e4801b4f2bbc9e0b /.local/bin/uni
parent6c2eace918f29d1d24f1fb89358f45f8d00497d0 (diff)
uni: Fix usage for runes > U+FFFF
Diffstat (limited to '.local/bin/uni')
-rwxr-xr-x.local/bin/uni3
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/uni b/.local/bin/uni
index 72f9b70..a7b7000 100755
--- a/.local/bin/uni
+++ b/.local/bin/uni
@@ -14,7 +14,8 @@ func setup {
cdr = substr($2, RSTART + 1, RLENGTH - 1)
sub(/[A-Z]{2,}([^)]|$)/, car tolower(cdr), $2)
}
- printf "\\u%s;U+%s %s\n", $1, $1, $2
+ long = substr("00000000", 1, 8 - length($1)) $1
+ printf "\\U%s;U+%s %s\n", long, $1, $2
}
' >$DATA
}