Project

General

Profile

Actions

Bug #9096

closed

Regexp.quote(UTF-8) returns US-ASCII

Added by walles (Johan Walles) over 10 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
Backport:
[ruby-core:58229]

Description

The attached program contains a unit test demonstrating that doing Regexp.quote() on an UTF-8 encoded string returns a US-ASCII encoded string (or at least I think it does...).

I would expect Regexp.quote() to return a string with the same encoding as the input string.


Files

regexp-quote-encoding.rb (375 Bytes) regexp-quote-encoding.rb Repro walles (Johan Walles), 11/08/2013 05:01 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0