Forum: Ruby-core [Win32] redirection doesn't support non-codepage

5cf8f058a4c094bb708174fb43e7a387?d=identicon&s=25 unknown (Guest)
on 2014-08-30 18:06
(Received via mailing list)
Issue #9946 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED,
2.1: DONE

Backported into `ruby_2_1` branch at r47324.

----------------------------------------
Bug #9946: [Win32] redirection doesn't support non-codepage
https://bugs.ruby-lang.org/issues/9946#change-48569

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: cruby-windows
* Category: platform/windows
* Target version: current: 2.2.0
* ruby -v: 2.2.0
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
~~~
> del t-*

> chcp
現在のコード ページ: 932

> .\ruby -v -e 'n="t-\u{30c6 30b9 30c8 f6}.txt"; p n; system("echo",
Time.now.to_s, out:n)'
ruby 2.2.0dev (2014-06-15 trunk 46438) [x64-mswin64_120]
"t-\u30C6\u30B9\u30C8\u00F6.txt"

> dir /b t-*.txt
t-繝・せ繝暗カ.txt
~~~

~~~
> del t-*

> .\ruby -v -e 'n="t-\u{30c6 30b9 30c8}.txt"; p n; system("echo", Time.now.to_s,
out:n)'
ruby 2.2.0dev (2014-06-15 trunk 46438) [x64-mswin64_120]
"t-\u30C6\u30B9\u30C8.txt"

> dir /b t-*.txt
ファイルが見つかりません

> dir /b t-*
t-繝・せ繝・txt
~~~
This topic is locked and can not be replied to.