File encoding(s) such as ASCII, ISO-8859, UTF-8, etc.
Questions tagged [encoding]
58 questions
9
votes
1 answer
Can I define a custom encoding for vim?
I frequently use Programming Puzzles and Code-golf. Lots of users over there have written custom languages purely for golfing. I'm even working on my own right now. Lots of these languages have their own custom encodings so that they can squish more…
DJMcMayhem
- 17,581
- 5
- 53
- 85
3
votes
1 answer
Specify UTF-8 encoding in Vimrc
Since Vim and NeoVIM defaults to UTF-8, does it make any sense to specify the same option explicitly in vimrc? set encoding="utf-8"
Zoltan King
- 259
- 2
- 8
2
votes
1 answer
Can I change the encoding of the content of a file to show Chinese characters?
I have a file containing contents(Unicode escape string in specific) like this:
title=\"\u5e2e\u4e0a\u5934\u6761\">\u5e2e\u4e0a\u5934\u6761<\/a><\/li>\n
in my working Vim window and want to show it as Chinese.
This is the output of the locale…
Lerner Zhang
- 740
- 7
- 19
1
vote
1 answer
Encoding of the spellfile en.utf-8.add
When I open my private spellfile en.utf-8.add, words containing
unusual characters, such as pϑsis, are rendered incorrectly;
in this case, pÅësis. At the bottom of the screen it says
[converted], and :set shows that the fileencoding is…
Toothrot
- 3,129
- 13
- 27
1
vote
0 answers
Vim still displays the last removed character
when my terminal LANG=en_US.UTF-8, my vim display is messed in that when page down or page up, the last page's conent is still displayed. or when I delete a character, for example, in "abcdef", I use x to delete character "a", the display in vim is…
user41771
- 11
- 1
1
vote
1 answer
This file looks fine with the more command. Why do I see all of these extra characters in vim?
I just opened a file and found what looked like a bunch of garbage at the beginning and ending of each…
Christopher Bottoms
- 3,772
- 6
- 22
- 33
1
vote
2 answers
Can I fall back to latin1 if there are illegal bytes?
The help text for fileencodings says this:
This is a list of character encodings considered when starting to edit
an existing file. When a file is read, Vim tries to use the first
mentioned character encoding. If an error is detected,…
Daniel Wagner
- 225
- 1
- 6
0
votes
2 answers
How to change the encoding of the text in the current buffer?
I have written a file with :set fileencoding=ISO-2022-JP :wq.
When I try to open it again it is completely unreadable. :set encoding? shows that vim has misinterpreted the content as encoding=utf-8.
When I try to change the encoding with :set…
jakun
- 155
- 3
0
votes
1 answer
File encoding other than utf-8
There is a file that I have to use in iso-2022-jp encoding.
I tried
:e ++enc=iso-2022-jp
:w
in the hope of converting the fileencodings to "iso-2022-jp" permanantly.
But the next time I opened the file, vim responds to me
:se…
Taro
- 153
- 3
0
votes
0 answers
My vim can't print Chinese right on my mac?
only the vim app can't show the Chinese right. I have checked the encoding, fileencoding and fileencodings configs, all of them are utf-8 at the first.