[ad_1]
I'm having trouble with getting japanese characters as user input through console.
I wrote a simple program to exemplify:
print "1> "
line1 = gets
print "2> "
line2 = gets
print "3> "
line3 = gets
puts line1 + line2 + line3
When I run it I get:
1> 古池や
2> 蛙飛び込む
3> 水の音
???
?????
???
I already checked it's not an output problem, as print "おはよう"
works perfectly. So I'm assuming it's the input's fault. I'm running it on Win10 using PowerShell, so it may also be a console thing.
Thanks in advance!
[ad_2]
لینک منبع