Hi,
I asked for that on ruby-talk but got no satisfying answer.
So I try to express it more clearly.
--------------------
#!/usr/bin/env ruby
# -*- coding: UTF-8 -*-
puts $KCODE
"\xc3\xa4" =~ /./
puts $&.length
--------------------
I execute this as
$ chmod +x enc.rb
$ ./enc.rb
NONE
1
$ ruby -Ku enc.rb
UTF8
2
Why don't I retrieve the UTF-8 answer in the first case?
I tried it with Ruby 1.8.2 and 1.9 on Debian Linux.
Bertram
--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de