hey,
I am trying to convert a sample russian encoding file to English encoding using iconv utility.
Its almost done but with each converted character i am getting one extra character which must not come.
my sample Russian text is
test.txt
~
and script which i am using for conversion is
script
>out
for i in `iconv -l`
do
o=`iconv -f cp866 -t $i test.txt`
len=`expr length "$o"`
if [ "$len" -gt 2 ]
then
echo $o#$i>>out
fi
done
and sample output for few almost successfully converted text are:
out
@ A B C D E G H I J K ~ CP932
@ A B C D E G H I J K ~ CSIBM932
@ A B C D E G H I J K ~ CSIBM943
@ A B C D E G H I J K ~ CSSHIFTJIS
@ A B C D E G H I J K ~ CSWINDOWS31J
@ A B C D E G H I J K ~ IBM-932
@ A B C D E G H I J K ~ IBM-943
@ A B C D E G H I J K ~ IBM932
@ A B C D E G H I J K ~ IBM943
@ A B C D E G H I J K ~ MS932
@ A B C D E G H I J K ~ MS_KANJI
@ A B C D E G H I J K ~ SHIFT-JIS
@ A B C D E G H I J K ~ SHIFT_JIS
@ A B C D E G H I J K ~ SHIFT_JISX0213
@ A B C D E G H I J K ~ SJIS-OPEN
@ A B C D E G H I J K ~ SJIS-WIN
@ A B C D E G H I J K ~ SJIS
@ A B C D E G H I J K ~ WINDOWS-31J
pls suggest where i am going wrong in this encoding process
Any help with that would be greatly appreciated.
---------- Post updated 06-14-11 at 08:08 AM ---------- Previous update was 06-13-11 at 09:20 PM ----------
hey guys can anyone help me on this..