Skip to content

[NETBEANS-6115] UTF-8 input is broken in Maven project. - #3289

Merged
neilcsmith-net merged 1 commit into
apache:deliveryfrom
mbien:maven_utf
Nov 1, 2021
Merged

neilcsmith-net merged 1 commit into
apache:deliveryfrom
mbien:maven_utf

Conversation

@mbien

@mbien mbien commented Oct 31, 2021

Copy link
Copy Markdown
Member

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.

@mbien

mbien commented Oct 31, 2021

Copy link
Copy Markdown
Member Author

windows build failure seems to be unrelated. Would be nice if someone could restart it.

@lkishalmi

Copy link
Copy Markdown
Contributor

Well, Travis looks, good. I've restarted the one failing job.

@lkishalmi lkishalmi added this to the 12.6 milestone Oct 31, 2021
@lkishalmi

Copy link
Copy Markdown
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.

@mbien
mbien changed the base branch from master to delivery October 31, 2021 19:24
@mbien

mbien commented Oct 31, 2021

Copy link
Copy Markdown
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 neilcsmith-net left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@neilcsmith-net
neilcsmith-net merged commit 4ff3390 into apache:delivery Nov 1, 2021
@mbien mbien mentioned this pull request May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants