I
Imre
Hi
I'm new to Ruby, so this might be a lame question, but googling
around, I couldn't find an easy answer.
So, how do I read a UTF-8 file?
Basically I just want to read a UTF-8 text file line by line, and
filter out some of the lines that match a regexp. Simply using
File.foreach doesn't seem to work because of some special characters
(like 0x1a / ^Z), where writing out the line that were just read in
doesn't give the same result as the original was.
Thanks for any help.
Imre
I'm new to Ruby, so this might be a lame question, but googling
around, I couldn't find an easy answer.
So, how do I read a UTF-8 file?
Basically I just want to read a UTF-8 text file line by line, and
filter out some of the lines that match a regexp. Simply using
File.foreach doesn't seem to work because of some special characters
(like 0x1a / ^Z), where writing out the line that were just read in
doesn't give the same result as the original was.
Thanks for any help.
Imre