昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期六, 七月 19, 2008

ubuntu GB18080 to utf-8

I copied some txt files from windows to linux. Then opened it. I found that vim cannot render the text correctly. I know this was caused by GBK encoding. I tried to open it with gedit, it's still messy code. Then I found that, if you go to the "open" of gedit, you can specify the encoding manually. But there were only two encoding, I add GB18030, and open the file, then everything was fine.

In text mode, we can use this command to do the conversion as well.
iconv -f GB18030 -t utf-8 4.txt > 4_U8.txt

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.