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 encoding when writing files. #618

Closed
wants to merge 1 commit into from
Closed

Use UTF-8 encoding when writing files. #618

wants to merge 1 commit into from

Conversation

ahf
Copy link
Contributor

@ahf ahf commented Jul 16, 2015

This patch forces write_file_if_contents_differ/2 to use UTF-8 as
encoding when writing files. This fixes an issue where UTF-8 characters
are processed and written back as ISO-8859-1 into the file, which makes
it impossible to use UTF-8 characters in .app.src files.

This patch forces write_file_if_contents_differ/2 to use UTF-8 as
encoding when writing files. This fixes an issue where UTF-8 characters
are processed and written back as ISO-8859-1 into the file, which makes
it impossible to use UTF-8 characters in .app.src files.
@ferd
Copy link
Collaborator

ferd commented Jul 17, 2015

Does it work better in raw mode rather than {encoding, utf8}? My worry is that we could be reading non-unicode (or in fact, non-text) files and corrupting them here. Using raw mode should bypass encodings set by the IO protocol (defaulting to latin1) and just go, I hope, to byte-direct output.

@ferd
Copy link
Collaborator

ferd commented Aug 10, 2015

@ahf would you like me to take over this one? I think I recall an IRC discussion where you were a bit busy to update this PR?

@tsloughter
Copy link
Collaborator

Handled by #757

@tsloughter tsloughter closed this Aug 29, 2015
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