Answer the question
In order to leave comments, you need to log in
Ruby: Cyrillic and command line?
I am learning Ruby. Version 1.9.3. SciTE editor. When you enter the following code and try to run it through the console, you get an " invalid multibyte char (US-ASCII)
"
error . Mechanically, the code works when # encoding: IBM866 is used at the beginning of the code , but in this case, the so-called. "krakozyabry".
How to make this mechanism work correctly with Cyrillic? If possible, write the answer as for a person who comprehends this knowledge from scratch.
puts 'Приветик, ну и как Вас зовут?'
name = gets.chomp
puts 'Вас зовут ' + name + '? Какое прекрасное имя!'
puts 'Рад познакомиться с Вами, ' + name + '. :)'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question