From: Nick Snels Date: 2006-01-31T21:11:58+09:00 Subject: Re: Premature end of regular expression with non-ascii chara Indeed, it isn't in UTF-8. It's in ISO-8859-1 (Latin1). The problem here is that I would like to work in UTF-8, but I have to read in files. And these files are often (almost always) in ISO-8859-1. And I haven't found a way of converting these strings to Unicode in Ruby. 辿 and 竪 etc. form part of ISO-8859-1. Anyway I remove $KCODE altogether in config/environment.rb and now it works. And Axel I also get the numbers. In config/environment.rb I added: $KCODE = 'u' require 'jcode' to get Gettext to work. So it turns out that if you aren't fully working in UTF-8, you have to be carefull adding this. Thanks for pointing me to $KCODE, twice! Kind regards, Nick -- Posted via http://www.ruby-forum.com/.