Caleb Clausen wrote: > > Handling this kind of thing right means tracking encodings right.... > which means you'd have to extract the encoding from the http session > and then mark the input as that encoding in your ruby script... and > then deal with the inevitable incompatible encoding errors that would > crop up. > > It sounds to me, tho, like in this case what you have a just some > hacky little scripts and it would be acceptable for them to be > imperfect. So, in that case, I suggest trying to set the encoding for > your source file(s) to BINARY. That's a hack, but it ought to be > effective. Additional info on the source, external, and internal encodings: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings For the OP, I'd expect `ruby -EBINARY ...` or `ruby -EASCII-8BIT ...` should work. Regards, Bill