Keep file encoding on reformat

Hello,

can anybody tell me how to prevent changing file encoding on reformat to UTF-8 ?
I want to keep the current file encoding, but not every file has the same file encoding - changing project settings is no solution.


Thank you

2 comments
Comment actions Permalink

Hi there,

How do you set file encoding for a specific file?

It's quite odd that it happens this way (works perfectly fine for me .. but maybe it's because of my settings, which are "old" and had some options that are no longer available in Settings screen).

In any case: "Settings | File Encodings" -- find a file there and set specific encoding in right column (although it should work exactly the same (does for me) if encoding is set via editor status bar).

P.S.
You should have "encodings.xml" file in your project settings folder (.idea subfolder). If you do -- please attach it here.

0
Comment actions Permalink

Thank you, i found my mistake.
If every file have a different file encoding, then I have to set "System default" in File > Settings > File Encoding instead of UTF-8.
Like it seems until now, phpStorm don´t change the file encoding any more.

0

Please sign in to leave a comment.