From: mathew
Date: 2011-02-12T05:08:52+09:00
Subject: [ruby-core:35204] Re: [Ruby 1.9-Bug#4386][Feedback] encoding: directive does not affect regex expressions
On Wed, Feb 9, 2011 at 18:47, Usaku NAKAMURA wrote:
> But, as Eric said, US-ASCII regexp can match with UTF-8 string.
> So, this bug may not cause any troubles, I guess.
So long as ASCII regexps will still match UTF-8 strings as if they
were UTF-8 regexps -- i.e. regexps are silently coerced back to UTF-8
when necessary -- I don't see a problem.
I was just surprised that UTF-8 regexps were sometimes silently
converted to ASCII, and that regexps declared with // were ASCII by
default even if I had declared that I wanted UTF-8. I wondered if
there was a reason for doing all that extra processing that I was
missing.
mathew
--