edek
6/29/2008 7:51:00 AM
Hi,
I have simple script:
require 'iconv'
s = '?e?an?' # a few polish letters with accents
puts Iconv.iconv('ASCII//TRANSLIT', 'UTF-8', s)
I expect result like "aescnz".
I run "ruby myscript.rb" and the effect is "??????" - something went
wrong with the transliteration.
The case is, that if I run irb and write the same code, effect is OK.
What should I import to my script or where is the difference between
ruby interpreter and irb that makes it working in the second case?
Thanks in advance,
--
Marcin