gvim: Open file with format Unicode text, UTF-16, little-endian

169 views
Skip to first unread message

Copper Hill

unread,
May 26, 2009, 9:59:57 PM5/26/09
to worldhunter
set the below two options before opening the file
set encoding=utf-8
set fileencoding=utf-16le

note: before opening the file.

Hong Zhaogang

unread,
May 26, 2009, 11:55:53 PM5/26/09
to worldhunter
* convert Unicode text, UTF-16, little-endian to cp936

1. get rid of the bom bytes
dd ibs=2 skip=1 if=NewWordu.txt of=b1.txt

2. iconv.exe -f utf-16le -t cp936 b1.txt >NewWord.txt
Reply all
Reply to author
Forward
0 new messages