Project

General

Profile

Actions

Backport #3291

closed

File.expand_path returning wrong size

Added by blue_anna (Roberto Tomás Collins McCarthy) over 14 years ago. Updated over 5 years ago.

Status:
Closed
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

Actions

Also available in: Atom PDF

Like0
Like0