Hello everyone! I am making an app in Android mode. And I have a problem with displaying non-English characters.
I create a String variable, initialize it with non-English characters (Cyrillic).For example
String myString = “Слава психонавтам”;
And these characters are not displayed correctly (looks like Arabic ) on an Android device.
If I use Java mode, the characters are displayed correctly.
I tried to implement Cyrillic font from .ttf file.
But it doesn’t help.
I suspect that the problem is in the different encoding between ProcessingIDE in Windows and Android. But I don’t understand how to fix it.
I used several different Android devices, all devices have incorrect display of Cyrillic letters.
I use Processing 4.3.4 on Windows 10. I think the problem is in the encoding on the computer. Because if I write a string with Cyrillic characters to a .TXT file, save the file in UTF-8 encoding and then read it using
Problem solved! ))))))
This thread helped: Special characters on android mode -- encoding problem
On my Windows machine, I added a new environment variable JAVA_TOOL_OPTIONS and the value -Dfile.encoding=UTF-8. Then I rebooted the computer and everything worked fine.