//Tips tagged iconv
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Function to convert UTF-8 to WIN-1251 charset.
function iconv-win1251 {
if [ ${1%\.*} == ${1##*\.} ]; then
newfile="$1-win1251"
else
newfile="${1%\.*}-win1251.${1##*\.}"
fi
iconv $1 --from-code UTF-8 --to-code WINDOWS-1251 > $newfile
ls -l $newfile $1
}
