We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ghci> hSetEncoding stderr utf16 ghci> hGetEncoding stderr Just UTF-16 ghci> hSilence [stderr] $ print "hi" "hi" ghci> hGetEncoding stderr Just UTF-8
So, encoding was UTF-16, but after stderr was closed and reopened, went back to the default UTF-8.
This is a bad and unexpected side effect. Especially when a library is using silently internally, as in yesodweb/persistent#474
I think it can easily be fixed by getting the old encoding, and restoring it when re-opening the handle.
The text was updated successfully, but these errors were encountered:
@joeyh Thanks for bringing this up and sorry for the late reply. Patches welcome!
Sorry, something went wrong.
No branches or pull requests
ghci> hSetEncoding stderr utf16
ghci> hGetEncoding stderr
Just UTF-16
ghci> hSilence [stderr] $ print "hi"
"hi"
ghci> hGetEncoding stderr
Just UTF-8
So, encoding was UTF-16, but after stderr was closed and reopened, went back to the default UTF-8.
This is a bad and unexpected side effect. Especially when a library is using silently internally, as in yesodweb/persistent#474
I think it can easily be fixed by getting the old encoding, and restoring it when re-opening the handle.
The text was updated successfully, but these errors were encountered: