I
Iñaki Baz Castillo
Hi, using TreeTop parser I had a grammar defined working in Ruby1.8 but it=
=20
fails in 1.9.1:
~# ruby1.8 -e "Regexp.new('[\xC0-\xDF]')"
OK
~# ruby1.9 -e "Regexp.new('[\xC0-\xDF]')"
-e:1:in `initialize': invalid multibyte escape: /[\xC0-\xDF]/ (RegexpErro=
r)
I've found the following text about differences between 1.8 and 1.9:
"It is more rigorous that 1.8 when it comes to detecting invalid code. For=
=20
example, 1.8 accepts /[^\x00-\xa0]/u, while 1.9 complains of invalid multib=
yte=20
escape"
Ok, so how should I write the above Regexp to work on 1.9.1?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
=20
fails in 1.9.1:
~# ruby1.8 -e "Regexp.new('[\xC0-\xDF]')"
OK
~# ruby1.9 -e "Regexp.new('[\xC0-\xDF]')"
-e:1:in `initialize': invalid multibyte escape: /[\xC0-\xDF]/ (RegexpErro=
r)
I've found the following text about differences between 1.8 and 1.9:
"It is more rigorous that 1.8 when it comes to detecting invalid code. For=
=20
example, 1.8 accepts /[^\x00-\xa0]/u, while 1.9 complains of invalid multib=
yte=20
escape"
Ok, so how should I write the above Regexp to work on 1.9.1?
Thanks a lot.
=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>