Project

General

Profile

Backport #3291

File.expand_path returning wrong size

Added by blue_anna (Roberto Tomás Collins McCarthy) about 9 years ago. Updated 2 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:30234]

Description

=begin
$ 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]
"ó"
=end

History

#1

Updated by jeremyevans0 (Jeremy Evans) 2 days ago

  • Status changed from Open to Closed
  • Description updated (diff)

Also available in: Atom PDF