Thank you Ammar for the code and Caleb for the encoding explanation.
The special char that I wanted to remove was
text.gsub /[^\x20-\x7F\x0D\x0A]/, ''  did the job :)

-- 
Posted via http://www.ruby-forum.com/.