From: Xavier Noria Date: 2006-08-01T03:22:13+09:00 Subject: Re: Does Ruby need a "line separator" class? On Jul 31, 2006, at 6:54 PM, Xavier Noria wrote: > normalized_text_area = text_area.gsub(/\015\012/, "\n").gsub(/ > \015/, "\n") Just for the archives, this normalizes in Ruby with only one pass normalized_text_area = text_area.gsub(/\015\012?/, "\n") though it is less explicit. Let me add now that we are on it that if the text is Unicode it may come with a few more codes for newlines. All in all this is a PITA like character encodings, but is what we've got for historical reasons. -- fxn