[GHC] #5940: Unicode characters in the command line get messed up

GHC cvs-ghc at haskell.org
Wed Mar 14 15:13:17 CET 2012


#5940: Unicode characters in the command line get messed up
-----------------------------------------+----------------------------------
 Reporter:  volker-wysk                  |          Owner:                  
     Type:  bug                          |         Status:  new             
 Priority:  normal                       |      Component:  Runtime System  
  Version:  7.0.4                        |       Keywords:                  
       Os:  Linux                        |   Architecture:  Unknown/Multiple
  Failure:  Incorrect result at runtime  |       Testcase:                  
Blockedby:                               |       Blocking:                  
  Related:                               |  
-----------------------------------------+----------------------------------
 The command line isn't properly decoded to Unicode. The following program
 demonstrates the bug:

 import System
 main = do
    [a] <- getArgs
    putStrLn (show a)

 When called like this:

    ./bug ä

 The program will output this:

    "\195\164"

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5940>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list