Project

General

Profile

Bug #647

Source encoding not applied to 7-bit regular expressions

Added by pragdave (Dave Thomas) almost 11 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:19337]

Description

=begin
# encoding: utf-8
"cat".encoding # => #Encoding:UTF-8
"δδδ".encoding # => #Encoding:UTF-8
/cat/.encoding # => #Encoding:US-ASCII # <<<<
:δδδ.encoding # => #Encoding:UTF-8

I was expecting the regular expression to be encoded the same way a

string is.

Matz: Yes, it's a bug. Thank you.
=end

History

#1

Updated by naruse (Yui NARUSE) almost 11 years ago

=begin
memo:
If source encoding applied to 7-bit regular expressions,
we need Regexp#ascii_only? and special treatment in Encoding.compatible?.
=end

#2

Updated by matz (Yukihiro Matsumoto) almost 11 years ago

  • Category set to M17N
  • Status changed from Open to Rejected

=begin
It turns out not to be a bug. See [ruby-core:19344].

=end

Also available in: Atom PDF