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

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.)

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs