Re: [Haskell-cafe] Umlauts in command line arguments

2009-06-04 Thread Eric Mertens
Hello,

On Sun, May 31, 2009 at 5:24 PM, GüŸnther Schmidt gue.schm...@web.de wrote:
 When a command line argument contains an umlaut that argument gets garbled.

 I'm using ghc 6.10.2 on Win XP. Are there any known solutions for this
 problem?

Your question has inspired me to add a System.Environment.UTF8 module
to utf8-string 0.3.5

This module behaves like the System.IO.UTF8 wrapper.

-- 
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Umlauts in command line arguments

2009-05-31 Thread Gwern Branwen
On Sun, May 31, 2009 at 8:24 PM, GüŸnther Schmidt gue.schm...@web.de wrote:
 Hi all,

 When a command line argument contains an umlaut that argument gets garbled.

 I'm using ghc 6.10.2 on Win XP. Are there any known solutions for this
 problem?

 Günther

GHC mangles UTF by default. You probably want to use one of the utf8
packages; eg. 
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string
or http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-light

(Neither of them seems to allow for accessing *arguments* rather than
stdin/stdout, but you could probably do something with the
encoding/decoding functions.)

-- 
gwern
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe