Can anybody give me some insight on the following ...
# kotlin-native
y
Can anybody give me some insight on the following https://stackoverflow.com/questions/61581030/cyrillic-input-not-recognized-in-kotlin-native ? Thank you.
c
Did you try to check if the string is actually empty/whitespace? Maybe it can't display the characters for some reason?
y
It's definitely nor empty. The input is from keyboard and you can see it - 3 Cyrillic symbols.
c
I mean the string that you get — maybe it does get read correctly and just can't be displayed for some reason
y
The input is from the keyboard. The output is to the screen. The program outputs to the screen what has been read from the keyboard. Just two lines. Nothing else is being done. In case of Latin characters it works. In case of Cyrillic characters it does not.
c
The question is: does reading not work or does displaying it not work?
y
I'd say that reading does not work. I can output Cyrillic symbols to the screen.
By println(" … ")
c
Did you try to run the program outside the IDE, using CMD?
y
It's the same everywhere. In the IDE terminal and in the separate cmd. Tried to change the codepage as well.
After running the program in cmd I observe the strange codepage.
c
And I'm guessing it does work if you use the same code for JVM compilation?
y
Absolutely. It works fine. And in the case of jar as well.
The only thing to do is to change the codepage from 866 to 1251
Which is normal and explainable
c
Can reproduce with Polish diacritics:
Or á, ¡ — also empty
And it doesn't work with POSIX
getchar
nor
getwchar
for me, either
y
Does that mean that we face the BUG in Kotlin/Native?
c
It is possible