Project

General

Profile

Actions

Bug #10555

closed

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

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

Status:
Closed
Assignee:
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 1 (0 open1 closed)

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

Updated by nobu (Nobuyoshi Nakada) almost 10 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]
Actions #2

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

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

Also available in: Atom PDF

Like0
Like0Like0