Encoding without configuration: Eclipse (JSP) and VSCode

1

I have some issues related to encoding. Both in eclipse and Visual Studio Code are pointed to UTF-8. When I repair and save using eclipse, it works fine. But when I save in VSCode, encoding misconfigures.

Here's an example:

I use eclipse just to compile my application, and I feel much more comfortable developing it in VSCode.

    
asked by anonymous 27.06.2018 / 14:47

2 answers

1

If you are in English your VSCode, confirm that the setting is correct:

  • Go to File - > Preferences - > User Settings
  • Add input "files.encoding": "utf8" in the right window and save.
  • You can also choose to add only the entry:

    "files.autoGuessEncoding": true
    

    And let Visual Studio Code guess the encoding of the open file, as explained in the documentation : / p>

      

    When enabled, it will attempt to guess the encoding character when opening files. This setting can be configured per language too.

        
    27.06.2018 / 15:03
    1

    I was able to isolate the problem and eventually discovered that this problem is inherited from the eclipse. For this test, I did the following:

  • I created files in VSCode and in Notepad with .txt extension, and both opened normally
  • I have created files in both applications with the .jsp extension. When I created and moved from eclipse to other applications, it caused character problem. When I created it in notepad and VSCode, the two communicated well, but when I opened it in Eclipse, it gave the characters an error.
  • So, error in eclipse!

        
    28.06.2018 / 14:20