From: Nathan Olberding Date: 2006-05-04T13:00:42+09:00 Subject: Re: Searching Files Logan Capaldo wrote: > Assuming you know the encodings of the files, you may want to look > into iconv. > Also check out $KCODE, or the -K command line option > ri Iconv > ri Iconv::iconv > ri Iconv#iconv I'll have to check that out. Thanks! > What system are you on that 'cat' is so smart? (Maybe cat isn't so > smart, the encodings may be supersets of ASCII although that makes me > wonder why the ruby code doesn't work) Alternatively, what is the > encodings of the files? OpenBSD 3.8. The particular file I'm looking at as my main test subject was saved with TextEdit on MacOS X 10.2. In a funny twist, here's what the file shell command, run from BASH on OpenBSD 3.8, reports about the file in question: 2.txt: MPEG 1.0 Layer I, 128 kbit/s, ? Hz stereo -- Posted via http://www.ruby-forum.com/.