Hi Fan,

On Jan 20, 2008 3:03 PM, Fan Decheng <[EMAIL PROTECTED]> wrote:
>
> Here I mean on the Windows platform, using Vim 6.4 or 7.1.
>
> I've encountered this problem several times, but don't know whether
> there is a
> solution:
>
> 1. Use gvim to open a file with Chinese characters in its name. For
> example: 测
> 试.txt .
> 2. Type ":set enc=utf-8" (without quotes).

Here is a snippet from the Vim's reference:

        NOTE: Changing this option will not change the encoding of the
        existing text in Vim.  It may cause non-ASCII text to become invalid.
        It should normally be kept at its default value, or set when Vim
        starts up.  See |multibyte|.  To reload the menus see |:menutrans|.

Personally I think this should be a bug of Vim.  However, as it had
already been well-documented, I think you should follow the
principles.

> 3. Type ":e" to make the file content displayed using utf-8.
> 4. Type ":wq" to save the file.
>
> After these steps, the file is saved in the name ²âÊÔ.txt rather than the
> original name. Another thing that went wrong is 测试.txt.swp is left
> undeleted.
>
> I looked for any file name encoding options in vim but failed to find
> anything.

Please carefully read the documentations of the following options:

fencs
fenc
encoding
termencoding

> Any ideas?
>
> --
>                                                            Fan Decheng
>                                                        (Robbie Mosaic)
>                                                       [EMAIL PROTECTED]
>
>
>
> >
>


Regards,


L. F.

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

Raspunde prin e-mail lui