From: Yukihiro Matsumoto Date: 2009-02-17T10:16:52+09:00 Subject: Re: invalid byte sequence in US-ASCII (ArgumentError) Hi, In message "Re: invalid byte sequence in US-ASCII (ArgumentError)" on Mon, 16 Feb 2009 09:15:54 +0900, Luther writes: |I'm having some trouble migrating from 1.8 to 1.9.1. I have this line of |code: | |text.gsub! "\C-m", '' | |...which generates this error: | |/home/luther/bin/dos2gnu:16:in `gsub!': invalid byte sequence in |US-ASCII (ArgumentError) | |The purpose is to strip out any ^M characters from the string. I feel some smell of a bug. Could you show me the whole code and reproducing input please? matz.