diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-09-23 22:12:21 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-09-23 22:12:21 -0700 |
commit | 7272735b3d413a644fd9ab01eeae8ae9cd5a925b (patch) | |
tree | bb0fa978cee6702d0bb3300f234b1f08d2071c5f /src/Text/Pandoc/Writers | |
parent | 31107741f0ee69d444e5f9ed2d8272583024e10c (diff) | |
download | pandoc-7272735b3d413a644fd9ab01eeae8ae9cd5a925b.tar.gz |
More intelligent handling of text encodings.
Previously, UTF-8 was enforced for both input and output.
The new system:
* For input, UTF-8 is tried first; if an error is raised, the
locale encoding is tried.
* For output, the locale encoding is always used.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 84bf95dfb..211f8946b 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -33,8 +33,7 @@ import System.FilePath ( (</>) ) import qualified Data.ByteString.Lazy as B import qualified Data.Map as M import Data.ByteString.Lazy.UTF8 ( fromString, toString ) -import Text.Pandoc.UTF8 as UTF8 -import System.IO ( stderr ) +import System.IO ( stderr, hPutStrLn ) import Codec.Archive.Zip import Data.Time.Clock.POSIX import Paths_pandoc ( getDataFileName ) @@ -663,7 +662,7 @@ inlineToOpenXML opts (Image alt (src, tit)) = do , mknode "wp:docPr" [("descr",tit),("id","1"),("name","Picture")] () , graphic ] ] else do - liftIO $ UTF8.hPutStrLn stderr $ + liftIO $ hPutStrLn stderr $ "Could not find image `" ++ src ++ "', skipping..." inlinesToOpenXML opts alt |