Atom does not save in correct encoding

1

When you save a file to Atom , it always writes accents to UTF-8 .

Even the file being identified as ISO-8859-1 (there at the bottom).

Then I did the following test in the terminal:

Before opening the file:

file -I arquivo.php 
arquivo.php: text/x-php; charset=iso-8859-1

Correct text: You are not allowed.

After opening the file and saving:

file -I arquivo.php 
arquivo.php: text/x-php; charset=iso-8859-1

Wrong text: You do not have permission.

Do I need to install something to solve?

    
asked by anonymous 18.05.2017 / 17:58

2 answers

1

It's really a limitation, but it will help,

Just put a .editorconfig file in the root of your project, or in the directory you need

Rudimentary example:

root = true

[*]
charset = iso-8859-1 ou latin1(não lembro)

[*.{json,yml}]
charset = utf-8
    
18.05.2017 / 19:06
0

In this discussion (and this) says that really the atom has a problem identifying the type of encoding. They should be tidying up.

    
18.05.2017 / 18:58