Linxiao wrote:
> This is vim-dev maillist, better sending your question to [EMAIL PROTECTED] .
>
> PS. If you wanna save a UTF-8 content file, just :set fenc=utf-8 but
> not enc=utf-8.
>
> Good Luck!
Tt, tt, tt... If 'encoding' is other than UTF-8 (or GB18030), Vim cannot
represent all Unicode codepoints in memory; therefore, if you try to edit a
UTF-8 file you run the risk of losing part of the data. (If you set 'enc' to
UTF-16, UCS-2 or UCS-4 aka UTF-32, with any endianness, what Vim will use is
actually UTF-8.)
To edit UTF-8 data you should have both 'encoding' (= memory representation of
the data) and 'fileencoding (= disk representation of the data) set to UTF-8.
>
> On 1/20/08, 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).
>> 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.
>> Any ideas?
>>
>> --
>> Fan Decheng
>> (Robbie Mosaic)
>> [EMAIL PROTECTED]
>>
>>
>>
>
>
Best regards,
Tony.
--
During a grouse hunt in North Carolina two intrepid sportsmen
were blasting away at a clump of trees near a stone wall. Suddenly a
red-faced country squire popped his head over the wall and shouted,
"Hey, you almost hit my wife."
"Did I?" cried the hunter, aghast. "Terribly sorry. Have a
shot at mine, over there."
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---