Forum: Ruby Readlines help

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D7a3be2f966e2a822362da8aab583fc3?d=identicon&s=25 Bucco (Guest)
on 2007-03-18 18:05
(Received via mailing list)
I am using the latest version of Ruby on Windows.  When I do the
following in irb:'sometextfile.txt').readlines

I get an array of unicode characters.  The example in the book I am
following along with, Everyday Scripting with Ruby, shows each array
element as a line from the file.  No Unicode.  How do I get readlines
to work without spitting out unicode?

Dd580d5ba14af9c25588921d11e7d134?d=identicon&s=25 Augie De Blieck Jr. (Guest)
on 2007-03-19 19:04
(Received via mailing list)
I have a feeling it'll be a Windows irb configuration issue.  I just
tried it on my Windows box and everything parses fine.

Unless your text file isn't plain ASCII, perhaps?  Have you tried a
different text file?

This topic is locked and can not be replied to.