-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8350703: Add standard system property stdin.encoding #24738
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
8350703: Add standard system property stdin.encoding #24738
Conversation
|
👋 Welcome back smarks! A progress list of the required criteria for merging this PR into |
|
@stuart-marks This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 138 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@stuart-marks The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
|
/csr |
|
@stuart-marks has indicated that a compatibility and specification (CSR) request is needed for this pull request. @stuart-marks please create a CSR request for issue JDK-8350703 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
Webrevs
|
naotoj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Is a corresponding CSR being drafted?
| // purposes, substitute them with "sun.*" if they don't exist. If "sun.*" aren't | ||
| // available either, fall back to "native.encoding". | ||
| // Encoding properties for stdin, stdout, and stderr. For stdout and stderr, | ||
| // check "sun.*.encoding" properties before falling back to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could explain about sun* a bit more (just for compatibility) and stdin.encoding is free from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the comment could be clearer. As I understand it, it's just trying to saying that the legacy sun.stdout.encoding/sun.stderr.encoding properties for stdout/stderr only, no equivalent for stdin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the comment was a bit terse so I tried to clarify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks okay now.
| LCID userDefaultUILCID = MAKELCID(userDefaultUILang, SORTIDFROMLCID(userDefaultLCID)); | ||
|
|
||
| { | ||
| HANDLE hStdIn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a new variable, hStdOutErr could be reused with a proper name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I merged the local variables into a single one named hStdHandle. I'm not sure that's the best name. I surmise that the h prefix is "Hungarian Notation" to indicate that it's a handle, though it makes the name kind of redundant.
|
Overall I think this looks quite good. Follow-up PR can update APIs beyond System to reference it. |
|
OK thanks. Working on the CSR. |
naotoj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/integrate |
|
Going to push as commit 15f42e3.
Your commit was automatically rebased without conflicts. |
|
@stuart-marks Pushed as commit 15f42e3. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24738/head:pull/24738$ git checkout pull/24738Update a local copy of the PR:
$ git checkout pull/24738$ git pull https://git.openjdk.org/jdk.git pull/24738/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24738View PR using the GUI difftool:
$ git pr show -t 24738Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24738.diff
Using Webrev
Link to Webrev Comment