2015-10-24 18:48:48 +02:00
|
|
|
--- utf8lookup.orig 2007-06-30 05:31:37 UTC
|
|
|
|
+++ utf8lookup
|
|
|
|
@@ -8,9 +8,10 @@
|
|
|
|
# UTF-32 name
|
|
|
|
# 000543 ARMENIAN CAPITAL LETTER CHEH
|
2006-01-31 00:26:16 +01:00
|
|
|
#
|
2015-10-24 18:48:48 +02:00
|
|
|
+[ $(( $(printf '\1' | od -dAn) )) -eq 1 ] && end=le || end=be
|
2006-01-31 00:26:16 +01:00
|
|
|
echo 0x$1 | # feed command-line argument to ascii2binary's stdin
|
|
|
|
ascii2binary -t ui | # convert text to unsigned integer
|
|
|
|
-iconv -f utf32 -t utf8 | # convert utf-32 to utf-8 encoding
|
2015-10-24 18:48:48 +02:00
|
|
|
+iconv -f ucs-4$end -t utf-8 | # convert utf-32 to utf-8 encoding
|
2006-01-31 00:26:16 +01:00
|
|
|
uniname -b -c -e -g # feed to uniname, suppressing byte and character offsets,
|
|
|
|
# UTF-8 encoding, and glyph
|
|
|
|
|