dkowis/cucumber-jvm — comment on commit d2bd34986bf783e01d6da306639de049e6f6aca7
File:  line 0
By dkowis:

Hmm, I think I have that `#encoding: utf-8` in there on my branch at home, I must have forgotten to push it...

It doesn't work sadly. I can get it working only when specifying the KCode UTF-8, and forcing ruby-1.9, but even then it parses the stuff incorrectly.

I can run a script using the special characters as method names from the commandline jruby:

moreTest.rb:

```ruby
# encoding: UTF-8

def biết
puts "hey look I got called in UTF-8"
end

biết
```

```
$ jruby moreTest.rb
SyntaxError: moreTest.rb:3: \277Invalid char `\277' ('¿') in expression

$ jruby -U moreTest.rb
SyntaxError: moreTest.rb:3: \277Invalid char `\277' ('¿') in expression

$ jruby -U --1.9 moreTest.rb
hey look I got called in UTF-8
```

Unfortunately, I haven't been able to translate the magic that is -U into whatever's needed in an embedded Jruby ScriptingContainer.

The other solution might be to use an array of UTF-8 strings, and just use method_missing and fire it off that way.

As for making things load via `require`, I'd have to see how that works in the classpath, maybe it'd be better used as a JRubyBackend option `lang=EN` in the properties file. Also, there are several languages that don't work, VI doesn't, I think basically all the UTF-8 ones :( Same issue as the jython backend, it was commented on in the cukes mailing list.