diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/App.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index f7c1f218d..b639a97b7 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -426,8 +426,12 @@ inputToText convTabs (fp, (bs,mt)) = Nothing -> catchError (utf8ToText fp bs) (\case - PandocUTF8DecodingError{} -> - return $ T.pack $ B8.unpack bs + PandocUTF8DecodingError{} -> do + report $ NotUTF8Encoded + (if null fp + then "input" + else fp) + return $ T.pack $ B8.unpack bs e -> throwError e) inputToLazyByteString :: (FilePath, (BS.ByteString, Maybe MimeType)) |