L
L
Lakewake2011-12-18 13:51:06
Character encoding
Lakewake, 2011-12-18 13:51:06

jetbrains phpstorm & encoding

Good afternoon!
It so happened that I have to work with two projects - one has the default windows-1251 encoding, the other has utf-8. I use phpstorm for work and now every time I open another project I have to change the ide encoding in Settings->File Endcodings, otherwise I start editing 1251 files as utf and vice versa.

And now an interesting situation has turned out in general - I forgot to switch the encoding from utf8 to 1251 and edited one file from the project (1251) in utf encoding. Then I opened it with notepad++ and converted it to 1251, switched phpstorm to 1251, but now phpstorm shows it as utf-8 regardless of the settings.

Maybe I'm doing something wrong and the problem is not in phpstorm?

ps. phpstorm v3.0

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Kitmanov, 2011-12-18
@k12th

notepad++ likes to leave the BOM, maybe because of it PHPStorm thinks it's utf8?

T
tnz, 2011-12-21
@tnz

In the same place, these settings are set per project, i.e. set your own once for each project and that's it.

V
volegov, 2011-12-21
@volegov

If it's the BOM, then it can be removed in phpStrom via the context menu in the list of project files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question