Issue #5913 has been reported by Kenta Murata.

----------------------------------------
Bug #5913: CGI.escape cannot escape a string with invalid byte sequence.
https://bugs.ruby-lang.org/issues/5913

Author: Kenta Murata
Status: Assigned
Priority: Normal
Assignee: Takeyuki Fujioka
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-01-20 trunk 34342) [x86_64-darwin11.2.0] 


筝?罩c?????ゃ?????????????ゆ??絖??????? CGI.escape ??羝?????? ArgumentError ???莎激????障?????

$ .prefix/bin/ruby -rcgi -ve 'p CGI.escape("\xC0<<".force_encoding("UTF-8"))'
ruby 2.0.0dev (2012-01-20 trunk 34342) [x86_64-darwin11.2.0]
/Users/kenta-murata/work/ruby.git/.prefix/lib/ruby/2.0.0/cgi/util.rb:7:in `gsub': invalid byte sequence in UTF-8 (ArgumentError)
        from /Users/kenta-murata/work/ruby.git/.prefix/lib/ruby/2.0.0/cgi/util.rb:7:in `escape'
        from -e:1:in `<main>'

???????????????????違?????????????????????т信罩e?純?с?? https://gist.github.com/1646048



-- 
http://bugs.ruby-lang.org/