S
S
Stavr Strelov2020-05-03 20:11:12
Java
Stavr Strelov, 2020-05-03 20:11:12

Java. Error with Russian alphabet characters in Intellij Idea! Can you help?

I'm creating my Java project in Intellij Idea, but due to the fact that I'm not very versed in Intellij Idea, sometimes I poke in the wrong place (._. )
The point is this. Recently, I started adding serialization to my project so that progress is saved on the computer as .ser files. In Intellij Idea, these files were displayed in the tree of classes and folders and could be accessed. But when I went into them, I saw in these files incomprehensible signs and numbers, and on top there was an inscription in English about some kind of character formatting or something ... Well, in short, I clicked on one of these and now when I go to the files .ser , these buttons no longer appear, and most of the strange characters are displayed as normal. But the fact is that it was after I did this that my project stopped supporting the Latin alphabet and, in general, most Russian characters :(
For example, when I check whether a string matches any character of the Russian alphabet, the following error occurs:
Error:(447, 22) java: unclosed character literal
Here is the code if needed:

switch (button.getKeyChar()) { //Сравнивание нажатой клавиши с её возможными значениями.
    case 'ц': // Строка, в которой происходит ошибка
        // Код...
        break;
}


And even if all the lines in the program with the letters of the Russian alphabet are commented out or removed, the program will start, but all Russian inscriptions on buttons and other objects are displayed in the form of incomprehensible characters and numbers.

In short, the project basically stopped accepting the Russian alphabet :(
I don’t know, maybe it’s not because of this, but please, someone from Intellij Idea experts, express your opinion why this could happen, because I don’t really want to abandon the project from -for some button...
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2020-05-03
@IAmNoob

Try changing encoding:
https://www.jetbrains.com/help/idea/configuring-in...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question