diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-16 23:19:27 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-16 23:19:27 +0000 |
commit | 70fbe7822024d0acc68df3607ff25bf8d7a71751 (patch) | |
tree | 553cd2ef8cfc936fc890113596db2c4478fe5163 /statgen/doit | |
download | librcd-70fbe7822024d0acc68df3607ff25bf8d7a71751.tar.gz librcd-70fbe7822024d0acc68df3607ff25bf8d7a71751.tar.bz2 librcd-70fbe7822024d0acc68df3607ff25bf8d7a71751.tar.xz librcd-70fbe7822024d0acc68df3607ff25bf8d7a71751.zip |
initial import
(automatically generated log message)
Diffstat (limited to 'statgen/doit')
-rwxr-xr-x | statgen/doit | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/statgen/doit b/statgen/doit new file mode 100755 index 0000000..c38fe39 --- /dev/null +++ b/statgen/doit @@ -0,0 +1,42 @@ +#! /bin/bash + +if [ -z "$1" ]; then + echo "Usage: doit <file name>" + exit +fi + +# In some CP866 texts used "Yo" and "N" simbols from CP1251 encoding. This fixes it. +dos2unix -U $1 + +cat $1 | sed -e "s/¸/ñ/g;s/¹/N/g;s/°/ø/g" | iconv -f CP866 -t KOI8-R > $1.koi +cat $1 | sed -e "s/¸/ñ/g;s/¹/N/g;s/°/ø/g" | iconv -f CP866 -t CP1251 > $1.win +cat $1 | sed -e "s/¸/ñ/g;s/¹/N/g;s/°/ø/g" > $1.alt + +#cat $1 | sed -e "s/¸/ñ/g;s/¹/ü/g;s/°/ø/g" | iconv -f CP866 -t UTF-8 > $1.utf + +export LC_CTYPE="ru_RU.KOI8-R" +./generate $1.koi koi > russian_table.h 2> header1.tmp +./generate $1.koi win >> russian_table.h 2> header2.tmp +./generate $1.koi alt >> russian_table.h 2> header3.tmp +#./generate $1.win win >> russian_table.h 2> header2.tmp +#./generate $1 alt >> russian_table.h 2> header3.tmp + +cmp header1.tmp header2.tmp +if [ $? -ne 0 ]; then + echo "Different number items in win & koi tables. Strange..." + rm -f russian_table.h +else + cmp header1.tmp header3.tmp + if [ $? -ne 0 ]; then + echo "Different number items in win & koi tables. Strange..." + rm -f russian_table.h + else + cat header1.tmp >> russian_table.h + fi +fi + +rm -f header?.tmp +rm -f $1.koi +#rm -f $1.win +#rm -f $1.alt +#rm -f $1.utf |