Project

General

Profile

Actions

Bug #20704

closed

Windows: `-C` option does not work for multibyte path name

Added by nobu (Nobuyoshi Nakada) 3 months ago. Updated 15 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:118976]

Description

Related to [Bug #20699].

C:> \Ruby33-x64\bin\ruby.exe -C xテスト_test -ep
\Ruby33-x64\bin\ruby.exe: Can't chdir to xテスト_test (fatal)

https://github.com/ruby/ruby/pull/11493

Actions #1

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Description updated (diff)
Actions #2

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Status changed from Open to Closed

Applied in changeset git|d33e3d47b84a73b38644f2a3d41881ce9be6ef18.


[Bug #20704] Win32: Fix chdir to non-ASCII path

On Windows, chdir in compilers' runtime libraries uses the active
code page, but command line arguments in ruby are always UTF-8, since
33ea2646b98adb49ae2e1781753bf22d33729ac0.

Actions #3

Updated by nobu (Nobuyoshi Nakada) 3 months ago

  • Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) about 1 month ago

  • Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED

Updated by k0kubun (Takashi Kokubun) 19 days ago

  • Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE

Updated by deivid (David Rodríguez) 16 days ago

Hello @nobu (Nobuyoshi Nakada)!

One bundler spec started failing after upgrading our CI to use Ruby 3.3.6 on Windows. The error reads like this:

  Invoking `C:/hostedtoolcache/windows/Ruby/3.3.6/x64/bin/ruby.exe -ID:/a/rubygems/rubygems/bundler/spec -rD:/a/rubygems/rubygems/bundler/spec/support/artifice/fail.rb -rD:/a/rubygems/rubygems/bundler/spec/support/hax.rb D:/a/rubygems/rubygems/bundler/tmp/1.4/gems/system/bin/bundle config path D:/a/rubygems/rubygems/bundler/tmp/1.4/♥/vendor/bundle` failed with output:

  ----------------------------------------------------------------------
  Error: Command line contains characters that are not supported
  in the active code page (1252).
  ----------------------------------------------------------------------
# ./spec/support/command_execution.rb:26:in `raise_error!'
# ./spec/support/subprocess.rb:66:in `sh'
# ./spec/support/helpers.rb:213:in `sys_exec'
# ./spec/support/helpers.rb:107:in `bundle'
# ./spec/commands/install_spec.rb:1262:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:105:in `block (4 levels) in <top (required)>'
# ./spec/spec_helper.rb:105:in `block (3 levels) in <top (required)>'
# ./spec/support/helpers.rb:342:in `block in with_gem_path_as'
# ./spec/support/helpers.rb:356:in `without_env_side_effects'
# ./spec/support/helpers.rb:337:in `with_gem_path_as'
# ./spec/spec_helper.rb:104:in `block (2 levels) in <top (required)>'

The spec passed just fine on Ruby 3.3.5.

I wonder if this change is related.

Thank you!

Updated by deivid (David Rodríguez) 15 days ago

I just found https://github.com/ruby/ruby/pull/11991 which seems a more likely culprit, sorry for the noise here!

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0