diff options
Diffstat (limited to 'lib/rexml/parseexception.rb')
-rw-r--r-- | lib/rexml/parseexception.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rexml/parseexception.rb b/lib/rexml/parseexception.rb index 0481f72818..0c4d55abda 100644 --- a/lib/rexml/parseexception.rb +++ b/lib/rexml/parseexception.rb @@ -28,7 +28,7 @@ module REXML err << "\nLine: #{line}\n" err << "Position: #{position}\n" err << "Last 80 unconsumed characters:\n" - err << @source.buffer[0..80].gsub(/\n/, ' ') + err << @source.buffer[0..80].force_encoding("ASCII-8BIT").gsub(/\n/, ' ') end err |