Yukihiro Matsumoto
3/13/2009 10:48:00 AM
Hi,
In message "Re: invalid byte sequence in US-ASCII (ArgumentError)"
on Tue, 17 Feb 2009 22:55:23 +0900, Luther Thompson <lutheroto@gmail.com> writes:
|Actually, I always set my LANG to C. Since my original post, I found
|that I had forgotten to set my LC_CTYPE to en_US.UTF-8, which is
|Ubuntu's default. After fixing that, I still got the same error, but
|with "UTF-8" instead of "US-ASCII".
Ruby 1.9 distinguish text files and binary files, so please specify
"rb" instead of plain "r" (or omitting the mode) for binary files.
This restriction may be loosen in the future for simple substitution
like this one.
matz.