Sunday, July 18, 2021

Re: Conversion Error

> Hi Robert,
>
> On Sunday, 2021-07-18 06:18:36 -0700, Robert Solomon wrote:
>
>> I often copy-paste from a browser into a text file to save the content I
>> come across. When I try to save the file, I often get a conversion error.
>> I have to manually go thru each error and change the extended character to
>> an ascii one.
> Likely the text pasted from clipboard is in a different text encoding
> (usually UTF-16 on Windows) than the file is saved in, and the file's
> text encoding can't represent all characters. Issue the command
>
> :set fenc?
>
> that displays the current fileencoding. To be on the safe side choose an
> encoding that can represent all Unicode characters, common is UTF-8.
>
> So,
>
> :set fileencoding=utf-8
>
> before saving.
>
> Best have encoding (taken from current locale) and fileencoding aligned
> set to utf-8, but things may be more complicated on Windows. See
> https://vim.fandom.com/wiki/Working_with_Unicode and the help sections
> it references.
>
> Eike
>

Hi Eike,

I think that was it.  It seems that the fenc for my files is latin1. 
I'll add a line in my _vimrc to set fenc=utf-8

Thanks

--rob

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8c23ee68-a991-07ed-c247-b252196621de%40gmail.com.

No comments: