Yukihiro Nakadaira wrote:

> When 'encoding' is utf-16 (or ucs-2 or ucs-4) and 'fileencoding' is
> utf-8, Vim converts encoding wrongly.
> 
> Steps to reproduce:
>   :set enc=utf-16
>   :e ++enc=utf-8 utf8-multi-byte-text.txt
>     (At this time, file is properly loaded)
>   :w
> Then, Vim breaks the file.
> 
> It seems that Vim converts the internal utf-8 text from latin1 to utf-8.
> 
> This problem doesn't occur when fenc is not utf-8.

I'll put it in the todo list.  Using utf-16 for 'encoding' is rather
unusual, but we must not destroy the file contents even in rare
situations.

-- 
The goal of science is to build better mousetraps.
The goal of nature is to build better mice.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to