[Haskell-cafe] How to reverse ghc encoding of command line arguments

Brandon Allbery allbery.b at gmail.com
Sun Nov 16 18:42:28 UTC 2014


On Sun, Nov 16, 2014 at 8:42 AM, Ben Franksen <ben.franksen at online.de>
wrote:

> How do I break this cycle?
>
> Perhaps it is simpler to write our own getArgs/getEnv functions and
> directly
> convert the data we get from the system to a proper (Unicode) String?
>

Ideally there should be a System.Posix.Environment.getArgs that just
returns the raw POSIX string (possibly as a ByteString); as with most of
POSIX, there is no defined encoding for this, it's octets. If you insist on
imposing an encoding on it, you could start from that.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141116/45177b92/attachment.html>


More information about the Haskell-Cafe mailing list