diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-05-04 23:36:03 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-05-04 23:36:03 -0700 |
commit | f20c4ae928a41cb83455f11dba67ea51dfe27f3e (patch) | |
tree | c7fda20033719bd6ee75c0ee2b78de64144b88c6 | |
parent | d253955a7e4b46be0aa27e4b3686a0ecfb134f19 (diff) | |
download | pandoc-f20c4ae928a41cb83455f11dba67ea51dfe27f3e.tar.gz |
Convert command-line arguments to UTF8.
Resolves Issue #234.
-rw-r--r-- | src/pandoc.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index 0560efc0a..656099ce9 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -61,6 +61,7 @@ import Control.Monad (when, unless, liftM) import Network.HTTP (simpleHTTP, mkRequest, getResponseBody, RequestMethod(..)) import Network.URI (parseURI, isURI) import Data.ByteString.Lazy.UTF8 (toString) +import Codec.Binary.UTF8.String (decodeString) copyrightMessage :: String copyrightMessage = "\nCopyright (C) 2006-2010 John MacFarlane\n" ++ @@ -592,7 +593,7 @@ defaultWriterName x = main :: IO () main = do - rawArgs <- getArgs + rawArgs <- liftM (map decodeString) getArgs prg <- getProgName let compatMode = (prg == "hsmarkdown") |