-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dir.glob returns UTF-8 string with Windows-31J encoding #4693
Comments
quick fix
I checked the source code for Dir.glob.
Encoding.default_external for Japanese Windows 7 is Windows-31J (aka cp932 or ms932), and this code uses it for multi-byte file name built by Java which is encoded with UTF-8. |
Ruby uses encoding from input patterns. I tried to fix it, but this case still doesn't work:
|
Reproduced on Unix by forcing Windows-31J as external encoding: [] ~/projects/jruby $ jruby -EWindows-31J α.rb
@ahorek's fix in #4773 does address the primary issue for this bug, but I'm working on a patch that fixes the |
C:/blah/α.rb
Environment
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) Client VM 24.65-b04 on 1.7.0_65-b19 +jit [mswin32-x86]
Windows 7 Ultimate Service Pack 1 32-bit
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: