File size: 321 Bytes
df03d35 1bb0419 df03d35 1bb0419 df03d35 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/usr/bin/env bash
BASE=$1
if [[ $BASE == *ja* ]]; then
ENCODING=shift-jis
if [[ $BASE == *2022-mainichi* ]]; then
ENCODING=unicode
fi
else
ENCODING=unicode
if [[ $BASE == *2016a-yubikiri-old* ]]; then
ENCODING=gbk
fi
fi
for f in $BASE/*.ks; do
iconv -f $ENCODING -t utf-8 < $f > $f.tmp
mv $f.tmp $f
done
|