Skip to content

Fix file encoding problems with non-UTF-8 locales#7

Open
msakai wants to merge 1 commit intofinnsson:masterfrom
msakai:set-encoding-utf8
Open

Fix file encoding problems with non-UTF-8 locales#7
msakai wants to merge 1 commit intofinnsson:masterfrom
msakai:set-encoding-utf8

Conversation

@msakai
Copy link

@msakai msakai commented Jan 4, 2015

Haskell programs are usually written in UTF-8, but the default file encoding is determined by locale and may be different (e.g. CP932 encoding is used on Japanese Windows environment). This mismatch causes "hGetContents: invalid argument (invalid byte sequence)" error.

This patch fixes the problem by explicitly specifying the file encoding as UTF-8.

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.

1 participant