Patch for #401666: dictl: doesn't work with DICTL_USE_KONWERT https://sourceforge.net/tracker/index.php?func=detail&aid=2407721&group_id=605&atid=300605 Index: dictd/dictl.in =================================================================== --- dictd.orig/dictl.in 2008-01-20 17:58:41.000000000 +0100 +++ dictd/dictl.in 2008-01-20 18:02:40.000000000 +0100 @@ -24,11 +24,25 @@ # `iconv --help' gives more options than `man iconv' (on my SuSE 9.0 system at least) # the -c makes iconv omit invalid characters from output iconv -c -f $1 -t $2 - else if test "$DICTL_USE_KONWERT"; then - konwert $1-$2 + elif test "$DICTL_USE_KONWERT"; then + sedexpr=' + /(CP)?(437|8(5[0257]|6[0-69]|74))/ { s//cp\2/; q } + /8859_([1-9])/ { s//iso\1/; q } + /ANSI_X3.4(-19(68|86))?/ { s//ascii/; q } + /(US-)?ASCII/ { s//ascii/; q } + /(CP|WINDOWS-)(125[0-8])/ { s//cp\1/; q } + /ISO([-_]?8859-|8859)([1-9]|1[01345])/ { s//iso\2/; q } + /KOI8-?R/ { s//koi8r/; q } + /KOI8-?U/ { s//koi8u/; q } + /UTF-?8/ { s//utf8/; q } + /VISCII/ { s//viscii/; q } + /.*/ { s///; q }' + from=`echo "$1" | tr a-z A-Z | sed -r -e "$sedexpr"` + to=`echo "$2" | tr a-z A-Z | sed -r -e "$sedexpr"` + konwert "$from-$to" else recode -f $1..$2 - fi fi + fi } #####################################