Project

General

Profile

Actions

Bug #563

closed

Regexp::escape is not Encoding Aware

Added by JEG2 (James Gray) over 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[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

Actions #1

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Assignee set to naruse (Yui NARUSE)

=begin

=end

Actions #2

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Status changed from Open to Closed

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0