From: Andrey Kuznecov Date: 2009-04-20T16:30:32+09:00 Subject: Re: Windows CMD and international chars (åäö) Andre Arvidsson wrote: > Hi all, > So my question to all you wise Ruby coders out there is this: Is there a > solution to my problem and if so what is it? > You have to set 'Lucida Console' as console font in window properties. You may change console code page by 'chcp' command: C:\XP\system32>chcp Active code page: 1251 C:\XP\system32>chcp 65001 Active code page: 65001 <------- UTF-8 I use this: # encoding: utf-8 #Kernel::system('chcp 1251>nul') Encoding.default_external = Encoding.find(Encoding.locale_charmap) Encoding.default_internal = __ENCODING__ [STDIN, STDOUT, STDERR].each do |io| io.set_encoding(Encoding.default_external, Encoding.default_internal) end puts "[#{Encoding.locale_charmap}::#{Encoding.default_external}|#{Encoding.default_internal}]" puts 'Превед!' -- Posted via http://www.ruby-forum.com/.