Issue #7562 has been updated by tarui (Masaya Tarui).


????????????????????????????????????????????????????????????????
失礼???????????????????

whiteleaf ?????????????

----------------------------------------
Bug #7562: __FILE__ encoding in Windows 
https://bugs.ruby-lang.org/issues/7562#change-34745

Author: tarui (Masaya Tarui)
Status: Open
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-15 trunk 38381) [x64-mswin64_100]


[ruby-list:49085] ??????????bug??????????????????????????????????????????????
trunk????????????????????
---
Ruby2.0.0 ??????????????????????????????質??????????????????????

WindowsXP??????????????????????????????????????????起????????????????
__FILE__ ??????????????String#encoding ????????????????????????
??? UTF-8 ????????????????????????????????????????????????????????????????????????????

?????????????? arton ????????? http://www.artonx.org/data/asr/Ruby-2.0.0.msi ???使???

# ?????????????????D:\?????\???????????????.rb?
f0 = File.expand_path($0)
puts "$0:#{f0},#{f0.encoding}"
file = File.expand_path(__FILE__)
puts "__FILE__:#{file},#{file.encoding}"

??????????????????????????????
D:\?????>ruby -v ???????????????.rb
ruby 2.0.0dev (2012-11-01) [i386-mswin32_100]
$0:D:/?????/???????????????.rb,Windows-31J
__FILE__:D:/?????/縺???縺??縺???rb,Windows-31J

???????????????????????????
D:\?????>ruby -v D:\?????\???????????????.rb
ruby 2.0.0dev (2012-11-01) [i386-mswin32_100]
$0:D:/?????/???????????????.rb,Windows-31J
__FILE__:D:/?????????縺????縺??縺???rb,Windows-31J

??????????Ruby1.9.3?
jobs:0 $ ruby -v ???????????????.rb
ruby 1.9.3dev (2011-05-08) [i386-mingw32]
$0:D:/?????/???????????????.rb,Windows-31J
__FILE__:D:/?????/???????????????.rb,Windows-31J

??????????????????????????????????


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