Repository navigation
[NETBEANS-6115] UTF-8 input is broken in Maven project. - #3289
Merged
Merged
Conversation
Member
Author
|
windows build failure seems to be unrelated. Would be nice if someone could restart it. |
Contributor
|
Well, Travis looks, good. I've restarted the one failing job. |
Contributor
|
It seems to be trivial enough to be in 12.6. @mbien rebase this PR on delivery branch, so the RMs can vet this change to be included or not. |
Member
Author
|
going to have to force push since it doesn't rebase cleanly without also merging all the other commits |
Chars were written as bytes to a stream, ignoring the encoding. By wrapping the stream in a writer, chars can now be encoded properly. Chose to not specify the encoding so that the default can be used or overwritten by -Dfile.encoding=UTF-8. JDK 18+ uses UTF-8 as default, it will be probably best practice to set the encoding to UTF-8 for most JDK 17 projects too, while using the new 'native.encoding' property for edge cases.
neilcsmith-net
approved these changes
Nov 1, 2021
neilcsmith-net
left a comment
Member
There was a problem hiding this comment.
Giving Travis one more go, but looks sane to me. Let's get it in 12.6.
Yes, doing spec versions earlier does make switching base branch from master to delivery a little more work.
Closed
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.
Chars were written as bytes to a stream, ignoring the encoding.
By wrapping the stream in a writer, chars can now be encoded properly.
Chose to not specify the encoding so that the default can be used or
overwritten by -Dfile.encoding=UTF-8.
JDK 18+ uses UTF-8 as default, it will be probably best practice
to set the encoding to UTF-8 for most JDK 17 projects too, while using
the new 'native.encoding' property for edge cases.