Skip to content

GitProperties, BuildProperties support encoding. #10771

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

Closed
wants to merge 1 commit into from

Conversation

hengyunabc
Copy link
Contributor

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 25, 2017
@hengyunabc
Copy link
Contributor Author

@wilkinsona

#10748

@wilkinsona wilkinsona added for: team-attention An issue we'd like other members of the team to review priority: normal type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 25, 2017
@wilkinsona
Copy link
Member

Please see #10748 for background. This revised proposal seems like a good compromise to me. Unlike the encoding for application.properties, we can be sure that any configuration setting for the encoding of Git properties or build properties has been read before trying to read the properties file.

@snicoll
Copy link
Member

snicoll commented Oct 25, 2017

Do the plugins control how the properties file is encoded? For sure build.properties is written with ISO-9959-1 encoding. I haven't seen a property for the git plugin.

@wilkinsona
Copy link
Member

Good question, @snicoll. @hengyunabc How are you configuring your build to write UTF-8 characters to the properties files?

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Oct 25, 2017
@hengyunabc
Copy link
Contributor Author

@snicoll @wilkinsona

https://github.com/ktoso/maven-git-commit-id-plugin/blob/v2.2.3/src/main/java/pl/project13/maven/git/GitCommitIdMojo.java#L319

My project project.build.sourceEncoding is utf-8.

The content in git.properties:

git.commit.user.name=中文

@snicoll
Copy link
Member

snicoll commented Oct 25, 2017

@hengyunabc thanks, that's quite interesting. I guess we should do the same thing. That doesn't help Gradle users though.

@wilkinsona
Copy link
Member

The equivalent Gradle plugin always uses UTF-8.

@wilkinsona wilkinsona added for: merge-with-amendments Needs some changes when we merge and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-feedback We need additional information before we can continue labels Oct 25, 2017
@spring-projects spring-projects deleted a comment from 13567436138 Nov 1, 2017
@spring-projects spring-projects deleted a comment from 13567436138 Nov 1, 2017
@snicoll snicoll self-assigned this Oct 10, 2018
@snicoll snicoll added this to the 2.1.0.RC1 milestone Oct 10, 2018
snicoll pushed a commit that referenced this pull request Oct 10, 2018
@snicoll snicoll closed this in c91d9bf Oct 10, 2018
snicoll added a commit that referenced this pull request Oct 10, 2018
* pr/10771:
  Polish "Add encoding support for git and build properties"
  Add encoding support for git and build properties
@snicoll
Copy link
Member

snicoll commented Oct 10, 2018

@hengyunabc thanks for your contribution, I've merged it with a polish commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: merge-with-amendments Needs some changes when we merge type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants