Actions
Bug #11320
closedreopening stdio streams with non-ANSI filenames fails on Windows
Description
fname = 'ルビー'
File.write(fname, '')
p File.exist?(fname)
$stdin.reopen(fname, 'r')
It fails with Errno::ENOENT
on Windows even though the file exists and is readable. It's caused by using freopen()
(https://github.com/ruby/ruby/blob/v2_2_2/io.c#L6765). A wrapper that converts to UTF-16LE and then calls wfreopen()
has to be added to win32/win32.c
.
Actions
Like0
Like0