477b012142
- Change /usr/local replacement from LOCALBASE -> PREFIX. PR: ports/203706 Submitted by: John Hein <z7dr6ut7gs (at) snkmail.com>
14 lines
579 B
Text
14 lines
579 B
Text
--- utf8lookup.orig 2007-06-30 05:31:37 UTC
|
|
+++ utf8lookup
|
|
@@ -8,9 +8,10 @@
|
|
# UTF-32 name
|
|
# 000543 ARMENIAN CAPITAL LETTER CHEH
|
|
#
|
|
+[ $(( $(printf '\1' | od -dAn) )) -eq 1 ] && end=le || end=be
|
|
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
|
|
+iconv -f ucs-4$end -t utf-8 | # convert utf-32 to utf-8 encoding
|
|
uniname -b -c -e -g # feed to uniname, suppressing byte and character offsets,
|
|
# UTF-8 encoding, and glyph
|
|
|