Skip to content

Added possibility to specify encoding for generated git.properties file #131

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

Merged
merged 2 commits into from
Sep 23, 2014

Conversation

frankbregulla1111
Copy link
Contributor

.. and git.json file.

If no encoding is configured, platform encoding will be used as before.

Resolves #130

…t.json file.

If no encoding is configured, platform encoding will be used as before.

Resolves git-commit-id#130
@ktoso
Copy link
Collaborator

ktoso commented Sep 23, 2014

Hello @ffriedrich, as discussed in #130 (comment), let's just make sure we use UTF-8 everywhere instead of exposing another option (this plugin has way too many plugins already :-)).

Thanks a lot for digging into this, awaiting an updated PR!

@ktoso ktoso self-assigned this Sep 23, 2014
@frankbregulla1111
Copy link
Contributor Author

Ok, I have updated the pull request and set the encoding to UTF-8.

File gitPropsFile = craftPropertiesOutputFile(base, propertiesFilename);
try {
Files.createParentDirs(gitPropsFile);

fileWriter = new FileWriter(gitPropsFile);
outputWriter = new OutputStreamWriter(new FileOutputStream(gitPropsFile), Charset.forName("UTF-8"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use guava's Charsets.UTF_8 instead of strings here :)

@ktoso
Copy link
Collaborator

ktoso commented Sep 23, 2014

Looks good in general, would you mind fixing the one issue I pointed out and squashing this into one commit? I'll merge once I get internet again :-)

ktoso added a commit that referenced this pull request Sep 23, 2014
Added possibility to specify encoding for generated git.properties file
@ktoso ktoso merged commit fba077c into git-commit-id:master Sep 23, 2014
@ktoso
Copy link
Collaborator

ktoso commented Sep 23, 2014

Got hotel internet working, let's merge this :-)

@frankbregulla1111
Copy link
Contributor Author

cool, thank you!

@ktoso ktoso modified the milestone: 2.11 Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Platform encoding is used for generated git.json/git.properties
2 participants