Visual Studio Code does not recognize the accents

1

As you can see in the image VSC shows me that weird character instead of the "o". The worst of all is that it overwrites that word and stays as in the image. When I open the project in my eclipse it is shown with the weird character.

I need help to set it up and not to do that. Thanks.

    
asked by Hector Ccasani PerdidaMente 20.10.2018 в 18:17
source

1 answer

3

You have opened the file with a different encoding from the one used when it was saved.

Look in the Visual Studio Code status bar, where it shows the encoding. You will probably see "UTF-8".

Clicking on it will allow you to change it for another, for which it will give you the choice between "reopen with encoding" or "save with encoding". Choose the first option and try "Western Windows 1252"

Once you have converted it and you see it correctly in the editor, you can choose which encoding to save it by clicking again on the same site and choosing "Save with encoding". Choose utf8 for maximum compatibility with other platforms (and with the VS Code itself, for when you open it again).

    
answered by 20.10.2018 / 18:33
source