New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
French localisation: wrong encoding in ~/.viminfo
.
#8075
Comments
Does your If it doesn't, do you se a difference if you add set vi+=c in your vimrc? Best regards, |
No, there is no difference. The current encoding and the one used to write |
If you start Vim with Anyway, I have the same issue with I also tried creating a new viminfo file with the following steps and the encoding of the file is correctly set to utf-8.
So how did the viminfo file end up with the latin1 encoding? |
Related: why are so many files under |
Just historic reasons. French fits perfection in latin1 and the file encoding should be recognized automatically. |
Alright. After converting So I had a hunch that somehow the file had some latin1 characters in it that forced the thing to be recognised as latin1 and I ran a little bissection experiment with a backup of my original The Except I never pressed that key during that recording. I am somewhat used to see those mysterious |
According to this Wikipedia page, it's missing œ, Œ, and Ÿ. The first two are common in French, in words like cœur, sœur, œuf, etc. I think we should switch to UTF-8 for French. |
@ProgMetalSlug you beat me to it. |
Romain Lafourcade wrote:
Alright.
After converting `~/.viminfo` to UTF-8 via `++enc=utf-8`, the comments are no longer improperly encoded.
So I ran a little bissection experiment with a backup of my original `~/.viminfo` until I found the culprit:
<img width="479" alt="culprit" src="https://user-images.githubusercontent.com/344335/113776149-e1a3e500-9729-11eb-9f1a-cb8ce6eec3e4.png">
The `ý` is what appears to be forcing the whole buffer to be encoded in `latin1`, which presumably caused the issue.
**Except I never pressed that key during that recording.**
I am somewhat used to see those mysterious `<80>` (`0x80`) littering my recordings but that `0xfd` following a `<80>` is new to me.
The viminfo file isn't really a text file, it's better to consider it a
binary file that Vim uses to write and read internal data. As mentioned
in the help "you can edit it, if you're careful". In other words, if
you edit it you might wreck it.
…--
hundred-and-one symptoms of being an internet addict:
79. All of your most erotic dreams have a scrollbar at the right side.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
@brammool I am well aware of the risk, which is why I never edited it. I'm not sure why you bring this up. There was no manual editing involved at all. |
Describe the bug
In Vim with french localisation, the localised comments are not properly encoded.
To Reproduce
Detailed steps to reproduce the behavior:
Run
$ LANG=fr_FR.UTF-8 vim /tmp/foo
.Do some editing in that file and write it.
Run
vim --clean ~/.viminfo
.Move the cursor to line 7.
Behold this trainwreck:
Here are all the problematic lines:
Expected behavior
The comments should be encoded properly to look like this:
Environment:
:echo &encoding
printsutf-8
.Additional context
The maintainer of the french localisation seems unresponsive.
The text was updated successfully, but these errors were encountered: