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 dbf23c7e9b
commit 3043df6f92
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

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