I have an array with russian symbols. Then I want to find something
element in it by Array.index(elem).
In NetBeans 6.9.1 (it settings with utf-8) it works(write index in
FixNum class), but when i run .rb from a windows, it doesn't work(write
nil and NilClass). Why?
P.S. I'm paste the string: "# coding: utf-8" in the start of my script,
and all other operations works great, exclude this. What I must to do?
Are you sure that your file is really saved in UTF-8? Under Russian Windows,
for example, the standard Notepad will save it either in CP1251, which is the
ANSI locale, or in UTF-16. IIRC in WinXP notepad there is no way to save text in
UTF-8 (I may be wrong through).
···
On Sun, 22 May 2011 04:44:54 +0900, Misha Ognev wrote:
Hi. I have a problem.
Windows7
I have an array with russian symbols. Then I want to find something
element in it by Array.index(elem).
In NetBeans 6.9.1 (it settings with utf-8) it works(write index in
FixNum class), but when i run .rb from a windows, it doesn't work(write
nil and NilClass). Why?
P.S. I'm paste the string: "# coding: utf-8" in the start of my script,
and all other operations works great, exclude this. What I must to do?