Project

General

Profile

Bug #563

Regexp::escape is not Encoding Aware

Added by James Gray over 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
[ruby-core:18584]

Description

=begin
Escaping an encoded String can damage the encoding:

s = "+"
=> "+"
s.encode!("UTF-16BE")
=> "\x00+"
re = Regexp.escape(s)
=> "\+"
re.encoding
=> #Encoding:UTF-16BE
=end

History

#1 Updated by Koichi Sasada over 7 years ago

  • Assignee set to Yui NARUSE

=begin

=end

#2 Updated by Koichi Sasada over 7 years ago

  • Status changed from Open to Closed

=begin

=end

Also available in: Atom PDF