Search code examples
phpencodingphpstormfile-encodings

Setting encoding for new projects in PhpStorm


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.


Solution

  • 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.