Reputation: 424
I am trying to force PhpStorm to encode newly created files as UTF-8, instead of Windows-1252 (which seems to be the default).
I know I can set "Project encoding" in "settings/editor/file encodings", which sets the default encoding for all newly created files in the current project.
However I'd like to set default encoding for new projects, so I will not have to change it every time I create a new project. I've searched far and wide on the internets, but with no success.
Do you guys know how to set file encoding for new projects?
Thanks in advance.
Upvotes: 1
Views: 591
Reputation: 165088
All available settings that are used as defaults for newly created projects can be set at File | Default Settings...
.
https://www.jetbrains.com/help/phpstorm/2016.3/accessing-default-settings.html
You can also access them directly from Welcome screen -- will be just Settings
under Configure
drop down (could be called Preferences
on Mac -- cannot verify that as I have no Mac). But in this case default settings will be mixed with IDE-wide settings as well.
In both cases the options you need to change will be under Editor | File Encodings
.
Upvotes: 2
Reputation: 6379
When creating new projects, you can set a proper IDE Encoding, its right next to the Project Encoding:
When you edit an existing project, it automatically recognizes the current encoding and offers you to convert/reload the project in a proper encoding.
Upvotes: 2