Bug #3291: File.expand_path returning wrong size
http://redmine.ruby-lang.org/issues/show/3291

Author: Roberto Tomás Collins McCarthy
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [powerpc-linux]

$ echo $LANG
es_EC.utf8
$ cd /home/roberto/Código && irb
>> Encoding.default_internal="utf-8"
=> "utf-8"
>> Encoding.default_external="utf-8"
=> "utf-8"
>> a= File.expand_path(".")
=> "/home/roberto/Código"
>> a[15]
"\xC3"
>> a.length == a.force_encoding(a.encoding).length 
=> false
>> a[15]
"ó"


----------------------------------------
http://redmine.ruby-lang.org