Use "filesystem" encoding for PATH as in MRI. Fixes #3907.#3923
Closed
headius wants to merge 6 commits intojruby:masterfrom
Closed
Use "filesystem" encoding for PATH as in MRI. Fixes #3907.#3923headius wants to merge 6 commits intojruby:masterfrom
headius wants to merge 6 commits intojruby:masterfrom
Conversation
|
|
||
| putRubyKeyValuePair(runtime, rubyMap, key, (String) val, encoding); | ||
| Encoding valueEncoding = keyEncoding; | ||
| if ( key.equals("PATH") ) { |
Contributor
There was a problem hiding this comment.
if ( key.equalsIgnoreCase("PATH") ) {
Member
Author
There was a problem hiding this comment.
Mmm, I suppose this would be in line with environment vars being case-insensitive on Windows, wouldn't it.
Member
Author
|
The failure was valid; my changes were a bit overreaching in trying to get encodings right. I've reverted the modified behavior for "locale" encoding and everything is green again. |
Fixes the rest of jruby#3907.
This fixes the one regression in my previous changes. Because MRI always creates new strings when you read from ENV, they just normalize to locale encoding for setenv, and then either use locale encoding or filesystem encoding for getenv. The equivalent for us here is to just let the setenv string decode to Java String and then use the default getBytes to match it up with the default Charset used for locale, rather than attempting to transcode the string directly.
46bce29 to
9d7295d
Compare
Member
Author
|
Merged to master in 221ba4f. Merging to 9.1.2.0 branch now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #3907.