Skip to content

running GHCi screws up console display by changing code page

[Note: tested on two computers, both running the US English version of Windows XP Professional.]

Running GHCi screws up the display of non-ASCII characters like the line-drawing characters used in most interactive text-mode programs.

Apparently, GHCi changes the code page of the console session to 28591 for some reason and then fails to change it back when it exits.

To reproduce:

  1. Open up a new Command Prompt window.

  2. Run the CHCP command to see what the current code page is set to (probably 437) and run a text mode program such as EDIT that makes use of non-ASCII characters to confirm that it displays correctly.

  3. Navigate to the GHC bin directory, run ghci.exe, then immediately exit via :q .

  4. Run CHCP again to confirm that the code page has changed. Likewise, run EDIT (or whatever) again to confirm that it no longer displays correctly.

Workaround: issuing a "CHCP 437" command after running GHCi fixes the problem.

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information