-
Notifications
You must be signed in to change notification settings - Fork 84
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
hGetContent says invalid byte sequence on Windows, non-English locale #157
Comments
You could submit a PR, it is probably easier for you to test the change as you have the right context (Windows, non-English locale). |
This applies to non-Windows systems as well. If your locale is not set or set to something like I fixed an issue exactly like this one with Same fix could be applied here. Haskell source files are always assumed to be encoded in utf-8, same principal could be applied to happy |
This has caused problems for people trying to build the purescript compiler from source too: eg purescript/purescript#3813, erikd/language-javascript#86. I think having happy always assume that |
This is a workaround for upstream issue haskell/happy#157 By sticking to ASCII, we avoid locale issues.
This is a workaround for upstream issue haskell/happy#157 By sticking to ASCII, we avoid locale issues.
This is a workaround for upstream issue haskell/happy#157 By sticking to ASCII, we avoid locale issues.
struggled with this.. this combo worked for me
|
Before doing this
readFile
:https://github.com/simonmar/happy/blob/27596ff0ce0171d485bf96d38943ffc760923c90/src/Main.lhs#L72-L74
we may do
hSetEncoding h IO.utf8
before.See agda/agda#4161 (comment)
The text was updated successfully, but these errors were encountered: