Project

General

Profile

Bug #10555

'?' is not match to multibyte character at commandline globbing on Windows

Added by usa (Usaku NAKAMURA) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
cruby-windows
Target version:
[ruby-dev:48752]

Description

以下のような現象です。

D:\test> dir ?.txt
(snip)
2014/11/29  05:46                 0 あ.txt
               1 個のファイル                   0 バイト
               0 個のディレクトリ  114,140,901,376 バイトの空き領域

D:\test> ruby -e "p ARGV" ?.txt
["?.txt"]

原因は、glob処理としてruby_brace_glob()を呼んでいるためにencoding情報が渡されないためで、ruby_blace_glob_with_enc()を呼ばないといけません。
1.9以降の全ての版が該当します。

直し方はなかださんのパッチ袋に入ってるので省略。


Related issues

Related to Ruby master - Feature #2255: unicode parameters cannot be passed to rubyClosedActions

Associated revisions

Revision 33ea2646
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48648
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

Revision 48648
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

Revision 48648
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

Revision 48648
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

Revision 48648
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]

Revision 18c8bfaf
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision 48649
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: workaround

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_nonascii): workaround for other than cp932. [ruby-dev:48752] [Bug #10555]

Revision b4c3c317
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 48651
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: translit_char_bin

  • ruby.c (translit_char_bin): should not use code page dependent CharNext on UTF-8 string. [ruby-dev:48752] [Bug #10555]

Revision 1ce81d6f
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision 48652
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

ruby.c: transcode program names

  • ruby.c (process_options, ruby_script): transcode script name and program name to locale encoding as well as argv. [ruby-dev:48752] [Bug #10555]

Revision bbd0c7a3
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48716
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): test for command line globbing on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 8a7690a5
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 48717
Added by nobu (Nobuyoshi Nakada) almost 5 years ago

test_rubyoptions.rb: non-codepage names glob

  • test/ruby/test_rubyoptions.rb (test_command_line_glob_noncodepage): more assertion for fallback replacement on non-codepage names. [ruby-dev:48752] [Bug #10555]

Revision 51866
Added by nobu (Nobuyoshi Nakada) about 4 years ago

win32.c: no xmalloc at sys_init

  • win32/win32.c (rb_w32_sysinit, rb_w32_readdir): compare by encoding index to get rid of encoding initialization before VM object space allocation.

History

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

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

Applied in changeset r48648.


win32.c: use UTF-8 for argv

  • ruby.c (ruby_set_argv): convert argv from UTF-8.
  • win32/win32.c (rb_w32_sysinit, cmdglob, w32_cmdvector): convert wide char command line to UTF-8 argv, and glob in UTF-8 so that metacharacters would match multibyte characters. [ruby-dev:48752] [Bug #10555]
#2

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Related to Feature #2255: unicode parameters cannot be passed to ruby added

Also available in: Atom PDF