Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.40K
Windows console works with the CP866 encoding. So input and output should be redefined to CP866. This thread [url]http://www.ruby-forum.com/topic/184730[/url] suggests a nice solution: [CODE]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[/CODE] And it works. The text is now correctly displayed in Windows console. But … |