diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-09-10 19:53:45 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-09-10 19:53:45 -0700 |
commit | ca5217881de1be672ac855a1979e9436aa6ced35 (patch) | |
tree | 61c81ac99623a98567d43f36cdc7fc8916b445cf /src/pandoc.hs | |
parent | 6ccdde5571ff34a24c2daf969dbcd55126b43964 (diff) | |
download | pandoc-ca5217881de1be672ac855a1979e9436aa6ced35.tar.gz |
Encode filenames as UTF8.
Resolves Issue #252 (pandoc doesn't properly handle unicode filenames).
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r-- | src/pandoc.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index ef38c0332..d52538a36 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -54,7 +54,7 @@ import Network.HTTP (simpleHTTP, mkRequest, getResponseBody, RequestMethod(..)) import Network.URI (parseURI, isURI) import qualified Data.ByteString.Lazy as B import Data.ByteString.Lazy.UTF8 (toString, fromString) -import Codec.Binary.UTF8.String (decodeString) +import Codec.Binary.UTF8.String (decodeString, encodeString) copyrightMessage :: String copyrightMessage = "\nCopyright (C) 2006-2010 John MacFarlane\n" ++ @@ -850,4 +850,4 @@ main = do if outputFile == "-" then B.putStr writerOutput - else B.writeFile outputFile writerOutput + else B.writeFile (encodeString outputFile) writerOutput |