Hi!

The following program demonstrates a (another) GHC bug. The command line isn't properly decoded to Unicode.

arg.hs------------------------------

import System

main = do

[a] <- getArgs

putStrLn (show a)

--------------------------------------

When called like this:

./arg ä

The program will output this:

"\195\164"

I'll report this as a bug in the GHC Trac. But for now, I need to work around the problem somehow. The encoders in GHC.IO.Encoding all work on buffers. How do I recode the command line, in order to get proper Unicode strings?

Bye

Volker