7 cat _tmp3
| grep "$1" | while read i
; do
8 code
=`echo $i | cut -c1-6`
9 echo "$code $2" >> _tmp5
14 echo " * getting list of needed unicode characters..."
16 cat mappings
/*.TXT
| sed -n '/^0x../p' | \
17 cut
-f2,4 | sort | uniq | sed -n '/^0x/p' > _tmp1
18 cat _tmp1
| cut
-f1 | sort | uniq > _tmp2
21 echo " * making unique list of unicode characters meanings..."
24 cat _tmp2
| while read i
; do
25 sed -n "/^$i/p" _tmp1
| (read t
; echo "$t" >> _tmp3
)
30 echo " * creating one-byte fallback tables..."
34 echo " - for latin capital letters..."
36 cat _tmp3
| grep 'LATIN CAPITAL LETTER [A-Z]$' > _tmp6
37 cat _tmp3
| grep 'LATIN CAPITAL LETTER [A-Z] WITH' >> _tmp6
38 cat _tmp6
| sort +2 > _tmp4
40 cat _tmp4
| while read i
; do
41 code
=`echo $i | cut -c1-6`
42 fallb
=`echo $i | cut -c8-29`
43 cat _tmp4
| fgrep
"$fallb" | cut
-c1-6 | (read i
;
44 echo "$code $i" >> _tmp5
)
48 echo " - for latin small letters..."
50 cat _tmp3
| grep 'LATIN SMALL LETTER [A-Z]$' > _tmp6
51 cat _tmp3
| grep 'LATIN SMALL LETTER [A-Z] WITH' >> _tmp6
52 cat _tmp6
| sort +2 > _tmp4
54 cat _tmp4
| while read i
; do
55 code
=`echo $i | cut -c1-6`
56 fallb
=`echo $i | cut -c8-27`
57 cat _tmp4
| fgrep
"$fallb" | cut
-c1-6 | (read i
;
58 echo "$code $i" >> _tmp5
)
62 add_fallback
"DOUBLE .*QUOTATION MARK" "0x0022" "double quotations"
63 add_fallback
"SINGLE .*QUOTATION MARK" "0x0027" "single quotations"
64 add_fallback
"DASH" "0x002D" "dashes"
68 echo " * removing infinite loops from fallback tables..."
70 cat _tmp5
| grep -v '\(0x....\) \1' | sort > Fallbacks
72 rm -f _tmp1 _tmp2 _tmp3 _tmp4 _tmp5 _tmp6