fix: explicitly set utf-8 encoding in haskell

avoids invalid character encoding issues on some systems
This commit is contained in:
Youwen Wu 2024-05-26 01:15:07 -07:00
parent 886afecb4f
commit 0ae22f9f32
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -5,6 +5,7 @@ import Data.List (isPrefixOf, isSuffixOf)
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import qualified Data.Text.Slugger as Slugger
import qualified GHC.IO.Encoding as E
import Hakyll
import System.FilePath (takeFileName)
import Text.Pandoc (
@ -76,7 +77,9 @@ config =
-- BUILD
main :: IO ()
main = hakyllWith config $ do
main = do
E.setLocaleEncoding E.utf8
hakyllWith config $ do
forM_
[ "CNAME"
, "favicon.ico"