invalid byte sequence in UTF-8 , need to re-encode ?

I have a string coming from an email body : (rdb:1) body "\r\nLe 3 sept. 2010 \340 19:06, Event Seve Test a \351crit :\r\n\r\n> Please answer the question by writing an X at the chosen places :\r\n> \r\n> are you coming : \r\n> \r\n> YES: X\r\n> \r\n> NO:_\r\n> \r \n> thanks for you answer\r\n> \r\n> the Seve Ballesteros"

when I want to resent this boy in another email, I get an error , stating invalid byte sequence .. sure the \r\n are causing the error

(rdb:1) sending_confirmation_email(@origin, @destination, @subject, @message) ArgumentError Exception: invalid byte sequence in UTF-8

should I strip them ? or is there any way to re-encode the string in UTF-8 ??? ( Ruby 1.8.3 and Ruby 1.9.2 )

thanks for your help

erwin

Quoting Erwin <yves_dufour@mac.com>:

I have a string coming from an email body : (rdb:1) body "\r\nLe 3 sept. 2010 \340 19:06, Event Seve Test a \351crit :\r\n\r\n> Please answer the question by writing an X at the chosen places :\r\n> \r\n> are you coming : \r\n> \r\n> YES: X\r\n> \r\n> NO:_\r\n> \r \n> thanks for you answer\r\n> \r\n> the Seve Ballesteros"

when I want to resent this boy in another email, I get an error , stating invalid byte sequence .. sure the \r\n are causing the error

(rdb:1) sending_confirmation_email(@origin, @destination, @subject, @message) ArgumentError Exception: invalid byte sequence in UTF-8

should I strip them ? or is there any way to re-encode the string in UTF-8 ??? ( Ruby 1.8.3 and Ruby 1.9.2 )

What is the original encoding? It doesn't look like UTF-8. \r and \n are ASCII and so okay in UTF-8. It is the \340 and \351 that look suspicious.

Jeffrey