On 9/16/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Meino Christian Cramer wrote: > Hi, > > sometimes when saveing an "original unix file" (for example > $HOME/.zshrc) vim informs me about that the file is being > "[converted]". > > A > :set ff > > shows me, that it is really a unix-file and the "converted"-message > appears every time when it is saved once again. > > I am curious to know, what this "[converted]" means.... > > :help converted > > does not gave anything. And since I dont know what it means beside > that something is [converted] I dont know for what to search additionally. > > Dont let me die un[converted] ! :) > > Thanks a lot in advance even for any un[converted] hint ! :)))))) > > Keep hacking! > mcc > >The message [converted] appears when a successful conversion happend between the 'fileencoding' (the representation of the data on disk) and the 'encoding' (the representation of the data in memory). Such conversion may happen in one direction when reading and in the opposite direction when writing. Since 'encoding' is a global option, allowing it to be different than 'fileencoding' makes it possible to edit in parallel (e.g. in split windows) files which do not use the same character set. It also allows editing files in any charset while leaving 'encoding' at UTF-8 (though if UTF-8 is not your "locale" encoding there are some precautions to take when setting it). Conversion at read/write time is possible as long as only characters common to both "source" and "destination" encodings are used, and as Vim knows how to convert. Some conversions (e.g. between any of Latin1, UTF-8, UTF-16 and UTF-32) can be done internally; some others require the "iconv" function, which can be either absent, compiled-in and linked statically (the usual Unix practice) or linked dynamically (the usual Windows practice). Check your ":version" listing for +iconv or +iconv/dyn; or use ":echo has ('iconv')" which answers zero for FALSE (feature not present) or nonzero (normally 1) for TRUE (feature present). If you have "+iconv/dyn" but has("iconv") returns 0 then you lack the iconv.dll library in your $PATH. When Vim says [converted] it means conversion was successful. If it says [NOT converted] you should start asking yourself questions. (It won't say anything when 'encoding' and 'fileencoding' are the same, including when the latter, being empty, defaults to the former.) See :help read-messages :help 'encoding' :help 'fileencoding' :help 'fileencodings' :help ++opt :help mbyte-encoding :help +iconv :help iconv() :help /dyn
I am interested to display message 'converted from [encoding] to [encoding]' because I occasionally also had unexpected 'converted' message. Is there autocommand that can show extended conversion message ? Yakov
