P
P
Pavel2013-07-18 12:43:14
Character encoding
Pavel, 2013-07-18 12:43:14

Textmate 2: Working with encodings other than UTF-8?

Hello!
We have to work with a code in which all Cyrillic is in cp1251 for historical reasons. Now I use Sublime Text 2 and almost everything suits me, but I want to try textmate 2 in work. But for this I need two things:
1. Open files in cp1251 so that when opening, I do not specify the encoding manually.
2. All new files in certain directories must also be created in cp1251, because if I forget and commit in UTF-8, they will hit my hands.
I searched for information on Google as best I could, but did not find it. Does anyone have any recipes?
If suddenly someone was looking for similar information for Sublime Text 2 here, then here:
1. Set in the settings

"fallback_encoding": "Cyrillic (Windows 1251)"

2. Combine editable files into projects, edit the project and set in it:
"settings": { "default_encoding": "Cyrillic (Windows 1251)" }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2013-09-11
Vyazovoi @Vyazovoi

I solved the problem for myself through .tm_properties in the project directory:
encoding = Windows-1251

K
Konstantin Birzhakov, 2013-07-18
@KonstRuctor

Faced exactly the same problem. As a result, I discovered PhpStorm, where you can specify the encoding for each project. It's extremely convenient, try it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question