2449Re: Unicode conversion bug?
- Mar 12, 2008Mansing wrote:
> Thanks Tony for the advice. More details on my problem:Try the following after starting gvim afresh (lines starting with a
> I am using gVim on Windows Vista Business which has full (normal)
> Chinese support. I set "enc=ucs-2le" and "fenc=utf-8" for conversion
> (saving to utf-8 format); I use the "Save As" menu option to do the same
> on Notepad. The (ucs-2le) input file was displayed correctly on gVim
> with guifont "MingLiU".
> To examine the output files, I set "enc=utf-8" and the guifont to
> "MingLiU", for both cases. The utf-8 file converted by Notepad was
> displayed correctly, while that by gVim wasn't. The hex dumps, for both
> output files, were copied from the gVim window after ":%!xxd".
> mt 2008-03-12
double-quote are comments; you don't need to type them)
:if &tenc == "" | let &tenc = &enc | endif
:set enc=utf-8 fencs=ucs-bom,utf-8,utf-16le,latin1
" (the input UCS-2le file). Is it displayed correctly?
" only if it isn't:
" don't change 'encoding'
" the output (UTF-8) file
" to clear the current window
" is it displayed correctly now?
" gvim should reply: fileencoding=utf-8
" if it isn't displayed correctly
"...etc., until you get it to display correctly
If it totally doesn't work, retry the above after invoking the editor as
gvim -N -u NONE
in a cmd.exe window. You may or may not need to cd to the directory
containing gvim.exe beforehand.
When I was younger, I could remember anything, whether it had happened
or not; but my faculties are decaying now and soon I shall be so I
cannot remember any but the things that never happened. It is sad to
go to pieces like this but we all have to do it.
-- Mark Twain
You received this message from the "vim_multibyte" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>