P
P
PRAIT2019-01-08 15:14:00
Visual Studio Code
PRAIT, 2019-01-08 15:14:00

How does encoding affect the execution of a file?

Hello. By default, Visual Studio Code saves files in utf - 8 encoding.
If you save html, js, css in UTF - 8 encoding, then there are no problems with Cyrillic, and if you save the compiled java file in this encoding, then Cyrillic turns into incomprehensible hieroglyphs.
And what to do in this case? Is it necessary to save compiled files in windows 1251 encoding and does this affect the operation of the files themselves? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Balya, 2019-01-13
@Balya

You may be trying to open a file with the wrong encoding. In the lower right corner of the editor there is a button indicating the encoding, with which you can open the file again in the desired encoding (Reopen with Encoding).
In most cases, files are best saved in UTF-8. Forget about windows-1251.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question