L
L
LikeKey2021-03-29 09:35:41
Java
LikeKey, 2021-03-29 09:35:41

How to solve encoding problem when trying to read a file?

I'm trying to read the .properties file and take Russian characters from it as a value, but cracks are displayed, I attached the project encoding settings in intellij, set both with BOM and with NO BOM6061753316da6134236282.png6061753bf1595358339008.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-03-29
@LikeKey

Property files can only contain ASCII characters. To use encoding characters other than ISO-8859-1, you need to process files with the native2ascii utility, which is part of the JDK.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question