Project

General

Profile

Actions

Backport #6072

closed

[Windows] Dir.inspect returns the path in file system encoding

Added by nobu (Nobuyoshi Nakada) about 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
[ruby-dev:45280]

Description

=begin
同じく((URL:http://toro.2ch.net/test/read.cgi/tech/1324826777/711))から引用

1.9.3p125 で Dirオブジェクトを表示しようとすると
p Dir.open('R:/テストディレクトリ') # => #Dir:R:/???????????????????????????
2.0.0dev (2012-02-19) ではエラーになります
p Dir.open('R:/テストディレクトリ') # => inspected result must be ASCII only or use the same encoding with default external (Encoding::CompatibilityError)

1.9.2以下では
p Dir.open('R:/テストディレクトリ') # => #Dir:R:/テストディレクトリ
シフトJISのパスしか受け付けてくれませんけどね
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) about 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34795.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
    [Bug #6072]
Actions #2

Updated by naruse (Yui NARUSE) about 12 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (M17N)
  • Target version deleted (2.0.0)
Actions

Also available in: Atom PDF

Like0
Like0Like0