[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Premature end of regular expression with non-ascii character

K.Kosako

1/31/2006 12:20:00 PM

> Thank you both very much for the suggestions. First off I have
> $KCODE="u" in config/environment.rb (Rails). I have also tried to add it
> into the class. But the error remained.

This problem is quite unrelated to Oniguruma.
I doubt that you are writing the script with ISO 8859-1.
--
K.Kosako

(In the following, kine is with accent.)

[kosako@noa test]$ file iso-8859-1.rb utf-8.rb
iso-8859-1.rb: ISO-8859 text
utf-8.rb: UTF-8 Unicode text
[kosako@noa test]$ cat iso-8859-1.rb
reg = /kine/u
[kosako@noa test]$ cat utf-8.rb
reg = /kine/u
[kosako@noa test]$ ~/work/ruby-1.8.4/ruby iso-8859-1.rb
iso-8859-1.rb:1: premature end of regular expression: /kin
[kosako@noa test]$ ~/work/ruby-1.8.4/ruby utf-8.rb
[kosako@noa test]$