-
Notifications
You must be signed in to change notification settings - Fork 841
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
Setting codepage UTF-8 (65001) produces garbled double quotes in GHC output #824
Comments
Please see #793 and https://ghc.haskell.org/trac/ghc/ticket/10762. The reason for this change wasn't display, but to work around a GHC bug. I've already gotten the necessary changes merged upstream with GHC. |
@Lokathor I don't have a Windows 7 machine to test on (Windows 10 has never exhibited this problem for me), but I just pushed a commit that may help. Can you try it? |
well I checked out stack and tried to build it from the repo using my current version. Things seemed good for a while until it was time to build the stack package itself: stack-0.1.3.1: configure D:\Dropbox\dev\stack\src\Stack\Docker.hs:66:18: D:\Dropbox\dev\stack\src\Stack\Exec.hs:25:18: -- While building package stack-0.1.3.1 using: |
@Lokathor I've fixed the build error, but at this point I very much doubt my fix will actually work on Windows. |
I think the change I've just pushed will solve the problem, can you give it a shot? |
I'm curious if the fix works for symbols that contain unicode. My hunch is that it won't (they'll still be garbage, since the encoding of stdout/stderr is UTF-8 on Windows at this point, so transliteration won't be performed when writing to them). Not sure if it's worth worrying about, since hopefully messing with the codepage/encoding won't be necessary anymore once the next version of GHC is released (although I suppose we might want to keep it enabled for older GHCs, maybe?) |
Did the fix add a new dependency? When I tried again just now it couldn't even get to the part where stack is built because a package before it failed: D:\Dropbox\dev\stack>stack build Fetched package index.
7 |
That was added by #831 and we're planning to remove it. |
Perhaps on windows we should change the code page but not the character encoding. That will make the dump files and logs utf8, but use proper replacement characters. The error you're running into with install is due to #831, see the discussion there. |
I'm pretty sure we're talking about the same thing, but just to be entirely clear, do you mean these two Just want to understand the implications. First: is a handle's character encoding inherited by sub-processes? I don't think so, since handles don't have an encoding at the OS level (it's just part of GHC I/O subsystem). So changing these would make no difference at all in terms of what the |
Bingo On Sun, Aug 23, 2015, 8:53 PM Emanuel Borsboom [email protected]
|
Ok, that change is made. |
I was able to build the current revision and it causes GHC's special quotes to display properly. example: Old stack: Main.hs:5:8: Not in scope: ΓÇÿfooΓÇÖ Newly built stack: Main.hs:5:8: Not in scope: `foo' |
Thanks for confirming. |
I got this yesterday both with the official stack release (1.5.1) and after trying Setting codepage to UTF-8 (65001) to ensure correct output from GHC
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Invalid package ID: "base-4.9.1.0 bytestring-0.10.8.1" |
I don't think it's related to the codepage comment. I'd recommend opening
up a new issue with full repro instructions.
…On Tue, Aug 29, 2017 at 11:36 AM, Daniel Taskoff ***@***.***> wrote:
I got this yesterday both with the official stack release (1.5.1) and
after trying upgrade --git
Setting codepage to UTF-8 (65001) to ensure correct output from GHC
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Cabal file warning in ...cabal: Ignoring unknown section type: custom-setup
Invalid package ID: "base-4.9.1.0 bytestring-0.10.8.1"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#824 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB9avabrEccvp_EjoZ1OfZBT_ySvxks5sc82CgaJpZM4Fu6GI>
.
|
Okay, I'll first try the workaround mentioned here and if it doesn't work, I'll open a new issue. |
I haven't done anything fancy just installed new stack on a new computer. Some examples below:
It mutates the text on each run:
I also tried to reinstall stack and removing C:\sr but it just keeps talking in languages I don't comprehend. |
This also looks unrelated to the issue at hand. That said, I think this is something that's fixed on master. Can you try |
Hej, I tried Haskell today, and I saw something like this as well, they looks good if I copy over to a text editor, but they looks very different in the Mac terminal (in the attachment)
Any thoughts? |
When stack sets the code page within cmd.exe to try and make GHC output appear correct, it actually makes it worse instead. The fancy double quotes that GHC uses end up totally garbled.
example garbled text:
D:\Dropbox\dev\fbmessageparse\src\Main.hs:11:21:
Not in scope: ΓÇÿhGetContentsΓÇÖ
Perhaps you meant ΓÇÿgetContentsΓÇÖ (imported from Prelude)
Using Windows 7 64bit, which might be the problem since the stack for windows builds are done on Windows 8.1, but the codepages should be consistent enough across windows versions.
The text was updated successfully, but these errors were encountered: