From: Tom Link Date: 2009-02-17T01:34:04+09:00 Subject: Re: invalid byte sequence in US-ASCII (ArgumentError) > It's the underlying C API that does the line ending conversion. > Ruby inherited that behavior. Thanks for the clarification (also thanks to Gary). > Ruby does that when you set the internal encoding with > Encoding.default_internal= Unfortunately this isn't entirely true -- see: http://groups.google.com/group/ruby-core-google/browse_frm/thread/9103687d4ee9f336?hl=en# It doesn't convert strings & identifiers in scripts. Of course, there are good reasons for that (see the responses in the thread) if you don't define a canonical internal encoding. > There were many and long discussions about the encoding API, > mostly on Ruby core. I know that people who understand the issues at hand much better than I do discussed this subject extensively. I still struggle to fully understand their conclusions though. But this probably is only a matter of time. Regards, Thomas.