Skip to content
This repository was archived by the owner on Jul 9, 2020. It is now read-only.

Commit aec2e4b

Browse files
committed
Add script to generate character mapping for transliteration
1 parent 887ad1c commit aec2e4b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gencharmap

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
# Control code ranges [0x7f..0x9f]
3+
for i in $(seq 160 384); do
4+
hex=`printf '0x%04x\n' $i`
5+
char=`perl -C -e "print chr $hex"`
6+
trans=`echo "$char" | iconv -f utf8 -t ascii//TRANSLIT 2>/dev/null`
7+
if [ $? -eq 0 ]; then
8+
#printf "%3d\tU+%04x\t%s\t%s\n" "$i" "$hex" "$char" "$trans"
9+
printf "\t'$char': \"$trans\",\n"
10+
fi
11+
done

0 commit comments

Comments
 (0)