I'm trying to translate some parts of a project example where all comment parts and console output are in the Russian language, but when the project is opened via IDE, seems that Code Editor does not recognize this language, example:
Then, exists some setting into IDE (or any other trick) that can solve it (also to any language, not only Russian)?
Thank you.
The Delphi code editor supports non-ASCII (and non-ANSI) characters. Just make sure to use the UTF-8 encoding for the source code.
If you enter non-ANSI characters in a previously non-UTF file and try to save, the IDE will ask you if you want to change the encoding to UTF8:
In any case, you can use the editor's context menu to set the encoding:
However, the code editor is -- unfortunately -- somewhat buggy when you use non-ANSI characters. For instance, consider the following line of code:
If I press Ctrl+W at this point, I expect the word "Exit" to become selected, because that's what Ctrl+W is supposed to do. But the "strange" characters on the line makes the editor all confused, and this is what happens:
Here is the line as plain text:
ShowMessage('ریاضیات: (∂/∂t) ∫ sin(xt) dt'); Exit;