Ruby And Russion symbols

Today I have met interesting problem while I have tried to use Russian symbols in Ruby's strings on Windows XP.

So listing of main.rb
hello_world = "привет мир"

Ruby main.rb says:
invalid multibyte char (US-ASCII)

As I know Default Far Manager encoding is cp1251.

But all googling links tell only about next magic comment:
# coding: utf-8

I have tried this but got next:
invalid multibyte char (UTF-8)

So if you are using Far. Magic comment is:
# coding: cp1251

2 комментария(ев):

code1n said...

I had similar problem. To fixed it I used ruby 1.8.7 with gem named unicode.

Ivan Sidarau said...

Far Not support Unicode :(
Sad But True