Encoding latin/windows problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding latin/windows problem

Ni Va
Hi,

Using this string 'Unité' written in file under windows 10 french, it appears the char 'é' is not recognized after opening the file : 
'Unité'->Unité


Thank you

scriptencoding utf-8
fileencoding utf-8
ff=dos

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ccd5fcfa-37cf-407e-b364-f366fca34fbd%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Encoding latin/windows problem

Dominique Pellé
Ni Va <[hidden email]> wrote:

> Hi,
>
> Using this string 'Unité' written in file under windows 10 french, it appears the char 'é' is not recognized after opening the file :
>>
>> 'Unité'->Unité

That's exactly what you'd get when the file is saved in utf-8, but somehow
you open it as latin1 i.e. if you tried to open file foo with e.g.:

:e ++enc=latin1 foo

Vim should generally recognize the file encoding automatically if you
have this in your .vimrc:

  set enc=utf-8
  set fileencodings=ucs-bom,utf-8,latin1

Regards
Dominique

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAON-T_gxx6%2BcXoSJetMfw0HCEoPX_kbYGZZMu5Bz6a30i1Pmrw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Encoding latin/windows problem

Ni Va
Sorry it's not Vim but Excel that not interpret cp1252 or latin1 chars... a charset option certainly

Le mercredi 22 janvier 2020 10:44:09 UTC+1, Dominique Pelle a écrit :
Ni Va <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="5GydWGUADgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">niva...@...> wrote:

> Hi,
>
> Using this string 'Unité' written in file under windows 10 french, it appears the char 'é' is not recognized after opening the file :
>>
>> 'Unité'->Unité

That's exactly what you'd get when the file is saved in utf-8, but somehow
you open it as latin1 i.e. if you tried to open file foo with e.g.:

:e ++enc=latin1 foo

Vim should generally recognize the file encoding automatically if you
have this in your .vimrc:

  set enc=utf-8
  set fileencodings=ucs-bom,utf-8,latin1

Regards
Dominique

--
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/5c195246-3adc-4b4e-a025-1b1ded793b62%40googlegroups.com.