Cesar Romani wrote:
If I have a file with a chinese file name, f.e. 感情包袱.txt
It won’t open but it throws the message: E303: Unable to open swap file for
“????.txt”, recovery impossible

Instead with notepad I can open the file.

Many thanks in advance,

Andalou



Is your Vim version compiled with +multi_byte ? (:echo has("multi_byte") should return 1). The multi-byte feature is also mentioned in the ":version" text as one of +multi_byte, +multi_byte_ime or +multi_byte_ime/dyn

If yes, check near the bottom of the :version text the name of the compiler: Vim binaries compiled with BCC32 have been notorious in the past for bad support of multi-byte characters, especially in filenames; IIUC, other compilers such as gcc and (don't remember the compiler executable name) MS Visual C have less problems in that respect. (I could be wrong though; I don't use non-Latin1 filenames and only very rarely non-7-bit-ASCII ones.)

If has("multi_byte") is nonzero and it wasn't compiled with BCC32 then I don't know what it is -- maybe a bug. In this case, a makeshift workaround (until Bram fixes it) would be to rename the file back and forth to something with only 7-bit ASCII in the name.

Normally, E303 means the swapfile can't be opened; but you should still be able to edit the file itself, unless it is very large. But you won't get a recovery option if Vim crashes, so don't forget to save your work extra often.

Oh, and you are using a recent version of Vim aren't you? A year or two ago Vim just couldn't handle filenames with multibyte characters in them, but I thought that bug had been fixed.


Best regards,
Tony.

Reply via email to