Sorry, I made a mistake in my previous mail.

Should say:
Regexp.new("abc".encode("UTF-16BE"))
==> EncodingCompatibilityError: incompatible character encodings: US-ASCII  
and UTF-16BE

Bug?

Mike

On Mon, 15 Sep 2008 11:48:57 +1000, Michael Selig  
<michael.selig / fs.com.au> wrote:

> Your email spurred me on to play with Regexps on non-ascii compatible  
> encodings, and unless I have misunderstood something, I just can't get  
> Regexps to work properly at all.
>
> Try:
> Regexp.new("abc".force_encoding("UTF-16BE"))
> ==> RegexpError: invalid multibyte character: /abc/
>
> Bug?
>
> I am fairly sure that Regexp methods including escape will work properly  
> on UTF-8.
>
> Mike.