Project

General

Profile

Actions

Bug #14970

closed

-i option doesn't work for multi-byte-char filenames on Windows Ruby2.5.1

Added by tksotn (TAKASHI OOTANI) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [i386-mingw32]
[ruby-dev:50607]

Description

Z:>touch あ
Z:>ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [i386-mingw32]
Z:>ruby -i.bak -pe p あ
-e:1: warning: Can't rename あ to あ.bak: No such file or directory, skipping file
Z:>d:\Ruby24\bin\ruby.exe -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [i386-mingw32]
Z:>d:\Ruby24\bin\ruby.exe -i.bak -pe p あ
Z:> #=> works well

Z:>ruby -e "File.rename('あ','あ.bak')"
Z:> #=> works well

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 5 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r64243.


io.c: fix non-ascii filename inplace edit

  • io.c (argf_next_argv): convert filename to the OS encoding to be
    dealt with by system calls. [ruby-dev:50607] [Bug #14970]
Actions

Also available in: Atom PDF

Like0
Like0