Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [encoding]

File encoding(s) such as ASCII, ISO-8859, UTF-8, etc.

0
votes
1answer
21 views

Why does backslash-escaping a CJK character cause a very-magic regex match to fail?

My understanding of very-magic regexes is that you can escape any character outside [A-Za-z0-9_] with a backslash to make it match literally. However, I don't see that behaviour with CJK characters. ...
2
votes
1answer
43 views

How can I search for Unicode characters by hex code in very magic regexes in vimscript?

I am working on UTF-8 support for my editorconfig-core vimscript plugin. I have hit a strange snag. This is in official GVim 7.4 Win32. I would like to get this working on 7.4, rather than ...
5
votes
2answers
140 views

What is fileencoding of .vimrc?

I've upgraded vim and now it's unhappy about some UTF-8 values in my .vimrc. This lead me to the question -- when vim reads .vimrc, what encoding does it assume the file has? I.e. what's fileencoding ...
1
vote
1answer
57 views

Vim not encoding with UTF-8

I'm using Vim, installed from the Arch Linux repo. I've tried adding set fileencodings=utf-8 and set encoding=utf-8. I've tried with all caps (UTF instead of utf) and putting it in /etc/vimrc and ~/....
0
votes
1answer
395 views

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"
1
vote
2answers
98 views

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 ...
1
vote
0answers
124 views

What encoding does :! use?

I'd like low-level control over exactly what bytes I send and receive from a process spawned from some vimscript. What encoding is used for communications with commands started with :!foo? Can I ...
-1
votes
1answer
88 views

Is \r operating system specific?

In the Vim documentation, it says that \r "matches < CR >", however for the result of replacement I could not find in the documentation a description of what it does. For example, imagine this: :%...
1
vote
0answers
53 views

Reading in content from an external command with utf-8

I've got the following vim script to show a perldoc or per man page into a new tab and then rewrap it the text so it's more readable (I have a very wide monitor). nnoremap K :execute "tabnew <bar&...
1
vote
2answers
2k views

UTF-8 not working on VIM

I've searched a lot about this on Internet but nothing's working. I'm using Vim 8.0.3 on Windows 10 and I can't get the right encoding to work. It's not a problem when writing code, but the problem ...
0
votes
1answer
539 views

Why is it that if I put “set encoding=utf-8” in my vimrc file, plugins won't load properly?

Here is my vimrc file: call plug#begin('$HOME/vimfiles/plugged') Plug 'vim-airline/vim-airline' Plug 'itchyny/lightline.vim' Plug 'kien/ctrlp.vim' Plug 'python-mode/python-mode' Plug 'rdnetto/YCM-...
2
votes
1answer
126 views

How to interpret ASCII codes returned by “ga” command?

I'm cleaning data imported from Excel to Access, and ran across funny quotes that I'm having trouble getting unambiguous ASCII codes for. They are the hooked single quotes ‘ and ’. Vim's ga command ...
0
votes
2answers
154 views

How to combine reading from stdin (- invocation argument) with ++opt

I'm trying to combine two features of vim, but it doesn't seem to be possible. 1: vim - The first feature is invoking vim with a single-dash argument, which causes vim to read stdin and use the ...
2
votes
2answers
365 views

Printing unicode chars?

Is there a solution to printing unicode characters from gvim? See this: Results in this print result (Using a Linux setup and Vim 8.0.)
5
votes
1answer
414 views

How do I write a multi-line message to the quickfix or location list?

I've got a program that spits out multi-line messages separated with something other than a newline. I want these messages to show in the quickfix and location lists spanning multiple lines as ...
4
votes
1answer
132 views

Vim and gVim in Windows doesn't recognize Mongolian letters Өө and Үү

I'm trying to open and edit files with Mongolian text, written in Mongolian Cyrillic. In the cmd terminal and in powershell terminal if I choose Consolas font, everything is ok with Mongolian Cyrillic,...
1
vote
1answer
140 views

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], ...
1
vote
1answer
421 views

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 ...
4
votes
0answers
181 views

system function output with Chinese chars

I want to run shell command with system function and the command output has some Chinese chars. echo system('svn status') But I got incorrect encoding output like this: svn: ?\232?\173?\166?\229?\...
9
votes
1answer
185 views

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 ...
0
votes
1answer
431 views

Getting Error while opening files through vim

I am trying to use unicode characters in vim. Since msdos prompt didnt support unicode, I downloaded cygwin. I added some commands in .vimrc through cygwin. Basic commands like setting encoding, ...
10
votes
1answer
423 views

Wrong encoding while calling shell

I was experimenting with a DOT diagram and tried to do the following: :! dot -Tpng -oFab.png % I got an error because my filename has a special character ("ó" in "Fabricación"): C:\windows\system32\...
5
votes
1answer
768 views

gvim incorrect font (or encoding) in menu

I use 32bit gvim 7.4 on Win7 64bit CZ. I replaced the gettext and iconv libraries according to the guide on the vim website. I wanted to use utf-8 and have setup the guifont, encoding and fileencoding ...
4
votes
1answer
511 views

How does vim map keystrokes to hex values?

This question might be a little bit out of the ordinary for this site, but I want to better understand how vim works under the hood. I know that if I enter the hex value 0x01 vim will display it as ^A....
2
votes
0answers
160 views

VIM under Cygwin some characters missing

Just installed vim and vimified plugin set under cygwin. Everything works like a charm except one annoying issue - i can see some special symbols (like new line) and it seems that some characters are ...
4
votes
0answers
240 views

Encoding issue with filename in MacVim

Question In MacVim I type :tabe jäderberg.txt to open a buffer for that file. The file does not yet exist. My status line displays the file name jäderberg.txt. I do i<C-r>% to put the file name ...
0
votes
1answer
97 views

Old source code files display unexpected characters

I'm attempting to open the recently released source files of the ancient DeluxePaint on MacVim, however, every file has an unexpected sequence of ^Z^Z^Z^Z^Z... characters at the end: Two questions: ...
1
vote
1answer
167 views

This file looks fine with the more command. Why do I see all of these extra characters in vim? [duplicate]

I just opened a file and found what looked like a bunch of garbage at the beginning and ending of each line: ^[[35m^[[KsampleA.trimmed.count.20_to_30.not_in_ref.MULTI_in_sample.sam^[[m^[[K^[[36m^[[K:^...
1
vote
2answers
380 views

How to set both files to the encoding in vim diff from command line?

I've opened the files I want to diff using the following command: C:\temp\robocopyTasks>vim -c "edit ++enc=ucs-2le" -d C:\temp\robocopyTasks\acl\tasks_temp.txt C:\temp\robocopyTasks\acl\tasks_win....
2
votes
1answer
116 views

Vim Diffing a pair of Unicode little endian without BOM text files in a readable format?

I have a pair of "Unicode little endian without BOM" text files that I would like to diff each other via the command line. Unfortunately when I open them using the command line in vim for Windows ...
3
votes
2answers
114 views

Is there something similar to g8 but shows the values according to the file encoding

I am looking for a g8 equivalent that prints the hex values of the character under the cursor according to the file encoding of the file loaded in a buffer rather than assuming it's utf-8. Is there ...
35
votes
1answer
5k views

See the Unicode code point of the current character

How can I see the Unicode code point of the character where the cursor is? For example, if my cursor is on a ⌘ character, I'd like Vim to tell me that it is U+2318. Alternative information, such as ...