Force UTF8 for all text reading / writing. #1353
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced all usages of readFile, writeFile, hGetLine, and hPutStrLn from
Prelude with versions from
System.IO.UTF8
Fixes #94
Tested with
export LANG=C
. Was able to load a unicode-containing .idrfile, compile and run it, use interactive vim stuff like
case-splitting and proof search, and could also :addproof from the repl.
Technically, only the change to readFile in Idris/Chaser.hs is necessary
to fix #94. The rest are mainly for consistency. I am a little leary
of changing the output encoding to unicode when the system encoding
might not be that on the things that don't deal with idris code, e.g.
the .c, .java, .pom, etc output files, that are then run through gcc,
javac, whatever.
Also, this might address the issue fixed by #1334, and make #1334
redunant?