-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
evaluate plugin error hPutChar: invalid argument (cannot encode character '\8216') #3841
Comments
Year 2023, Unicode in Windows strikes again. This is likely https://gitlab.haskell.org/ghc/ghc/-/commit/74132c2b0992849f83ef87c8a56ac3975738e767 |
Thank you for the context! Does that mean, if we set the environment variable |
To set the environment variable GHC_CHARENC for GHC, you can use the following steps: Windows: Open the Control Panel. |
@fendor yes, I suggest to set |
Simple Fix on Windows:
|
Faced with similar problem after migrating to macOS Sonoma 14.2.1. Caused by |
Hi @geraldus. I am having the same error on my macOS Sonoma 14.2.1. Could you tell me the steps you took to solve it please ? I added this line
to my |
@unlocked2412 Hi! Sorry for the late reply. I checked my
As you can see, no
And restarted the shell session. |
@Delli From https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using.html?highlight=ghc_charenc#envvar-GHC_NO_UNICODE there are two environment variables.
If I understand correctly, if some one want to disable Unicode diagnostics output, they should set something like What is the meaning of |
I have tried everything still getting the same error |
I'm using WSL2 (Ubuntu), and setting the locale in the in there (eg in the @lorenzschreyer 's solution worked for me: (#3841 (comment)) |
Your environment
Which OS do you use?
windows 10
Which version of GHC do you use and how did you install it?
ghc 9.8.1 / tried other versions 9.2.2 same issue
How is your project built (alternative: link to the project)?
stack build
Which LSP client (editor/plugin) do you use?
vscode latest + extension Haskell v2.4.1
Which version of HLS do you use and how did you install it?
hls v 2.4.0.0
ghcup installed it
Have you configured HLS in any way (especially: a
hie.yaml
file)?no
Steps to reproduce
stack new project
in any hs file
try add evaluation
{-| double
double :: Num a => a -> a
double x = (2*x)
Expected behaviour
{-| double
Actual behaviour
{-| double
Debug information
The text was updated successfully, but these errors were encountered: