> Yosi Izaq wrote:
>> This happens to me when I copy paste text from my browser. It's
>> driving me crazy :)
>> How can I turn this off?
>
> I can't precisely answer this, but I'll give you some guesses: I'll
> guess that the browser is using one encoding and you have gvim/vim using
> a different, incompatible encoding. I'm not sure how to determine what
> encoding your browser is using, but the encoding for vim can be checked
> with
>
> set enc
> set fenc
>
> If you can live with utf-8, try using that.
>
> Regards,
> Chip Campbell
>
Yes indeed.
Conversion error when saving the file means that the file in the buffer
(in the 'encoding' charset) contains one or more characters which cannot
be represented in the 'fileencoding' charset which you're trying to save
the file in. For instance, the file contains an œ character (French oe
digraph) and you're trying to save it in Latin1.
If the conversion error happens when reading or pasting into Vim memory,
then your 'encoding' is not compatible with the data; IOW, Vim cannot
represent the data in memory with the present choice of 'encoding'.
I recommend to use UTF-8 for the data in Vim memory ('encoding'),
because Unicode (including UTF-8) can represent any possible computer
charset. Conversion between Unicode and Latin1 is trivial and Vim (if
compiled with +multi_byte of course, i.e. if has('multi_byte') is
nonzero) can do it without external help; conversion to or from some
other non-Unicode charset (or to or from GB18030, which technically is a
Unicode charset but requires large conversion tables) usually requires
the iconv library, either compiled-in or available for dynamic load at
runtime (to check it, make sure that has('iconv') has a nonzero value).
See also http://vim.wikia.com/wiki/Working_with_Unicode and the help
pages mentioned there.
See also :help 8g8
Best regards,
Tony.
--
Ten million Linux users can't be wrong!
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment