S
S
Sergey2014-11-20 20:00:29
linux
Sergey, 2014-11-20 20:00:29

How to save a file in linux with "windows - 1251" encoding?

Gentlemen, such a problem. I open the site for editing. It was made by someone else and completely in windows 1251. There are a lot of files and it is self-written, i.e. I cannot convert all thousands of files to a different encoding. You need to edit one file and a little bit.
In general, when saving, he writes, they say there are characters that cannot be saved in windows1251 and overwrites in utf-8, the site shows bugs.
I tried in sublime, phpstorm, gedit - the result is the same.
Colleagues on Windows say they say everything is saved without problems.
The question is, how can I work with this encoding and save to it? Someone faced this problem? I'm already inclined to roll Windows into a virtual machine ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Vasilyev, 2014-11-20
@butteff

vim
:e ++enc=cp1251 file.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question