convert_to_utf_8.sh: Fix buggy treatment of iso_8859-{11,13}.7

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-02-18 09:27:48 +01:00
parent f687d4518e
commit 5c97c6df63
1 changed files with 7 additions and 4 deletions

View File

@ -45,13 +45,16 @@ for f in "$@"; do
mkdir -p "$new_dir"
fi
case "$basen" in
iso_8859-11.7 | iso_8859-13.7)
from_enc=$enc
;;
armscii-8.7 | cp1251.7 | iso_8859-*.7 | koi8-?.7)
from_enc="${basen%.7}"
# iconv does not understand some encoding names that
# start "iso_", but does understand the corresponding
# forms that start with "iso-"
from_enc="$(echo $basen | sed 's/\.7$//;s/iso_/iso-/')"
;;
*)
echo "NULL TRANSFORM: $f"
from_enc=$enc
;;
esac