From: Logan Capaldo Date: 2006-05-04T10:15:00+09:00 Subject: Re: Searching Files On May 3, 2006, at 8:01 PM, Nathan Olberding wrote: > Excellent, excellent question! > > Some of these files definitely have non-ASCII encodings. This... is > kind > of frustrating. cat will show the contents of the files, vim will edit > the files... what do I do in my code to deal with this? Not every file > is of the same encoding. 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 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?