[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Readlines help

Bucco

3/18/2007 5:04:00 PM

I am using the latest version of Ruby on Windows. When I do the
following in irb:

File.open('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?

Thanks,
SA

1 Answer

Augie De Blieck Jr.

3/19/2007 6:03:00 PM

0

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?

-Augie

On 3/18/07, Bucco <phinsxiii@gmail.com> wrote:
> I am using the latest version of Ruby on Windows. When I do the
> following in irb:
>
> File.open('sometextfile.txt').readlines
>
> I get an array of unicode characters.
>