Bug #20704
closedWindows: `-C` option does not work for multibyte path name
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)
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.
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
ruby_3_2 48af30b068729058c2f45375e67fa76f6240a228 merged revision(s) d33e3d47b84a73b38644f2a3d41881ce9be6ef18.
Updated by k0kubun (Takashi Kokubun) 18 days ago
- Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
ruby_3_3 2b713dcb89c620daa55d672d2933ffde333ca5de merged revision(s) d33e3d47b84a73b38644f2a3d41881ce9be6ef18.
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!