Skip to content
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

Use UTF-8 charset when saving configs #404

Merged
merged 2 commits into from Aug 2, 2018

Conversation

nigredo-tori
Copy link
Contributor

Using the default charset is generally bad practice, and HOCON must always be in UTF-8 anyway.

Copy link
Member

@ruippeixotog ruippeixotog left a comment

Choose a reason for hiding this comment

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

LGTM! Please just take a look at the minor comment.

@@ -255,9 +256,10 @@ package object pureconfig {
* @param outputStream The stream in which the configuration should be written
*/
def saveConfigToStream[Config](conf: Config, outputStream: OutputStream)(implicit writer: Derivation[ConfigWriter[Config]]): Unit = {
val printOutputStream = new PrintStream(outputStream)
// HOCON requires UTF-8
Copy link
Member

Choose a reason for hiding this comment

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

Can you support this claim by adding a link to https://github.com/lightbend/config/blob/master/HOCON.md#unchanged-from-json on this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ruippeixotog ruippeixotog merged commit cd362a7 into pureconfig:master Aug 2, 2018
@leifwickland
Copy link
Collaborator

Post facto approval from me. Sorry for my slow response time.
Thanks for the contribution, @nigredo-tori!
@nigredo-tori, please consider sending a PR to add yourself to the pureconfig contributors file.

@nigredo-tori nigredo-tori deleted the fix-encoding branch August 4, 2018 15:59
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.

None yet

3 participants