diff --git a/src/Guide/Main.hs b/src/Guide/Main.hs index 0a08b83..b93d2bc 100644 --- a/src/Guide/Main.hs +++ b/src/Guide/Main.hs @@ -53,6 +53,7 @@ import Data.Serialize.Get as Cereal -- IO import System.IO import qualified SlaveThread as Slave +import GHC.IO.Encoding (setLocaleEncoding, utf8) -- Catching signals import System.Posix.Signals -- Watching the templates directory @@ -136,6 +137,8 @@ lucidWithConfig x = do -- | Start the site. main :: IO () main = do + -- force to use UTF-8 + setLocaleEncoding utf8 config <- readConfig mainWith config diff --git a/tests/Main.hs b/tests/Main.hs index 9bbe3d5..1309b15 100644 --- a/tests/Main.hs +++ b/tests/Main.hs @@ -4,8 +4,8 @@ module Main (main) where - import BasePrelude +import GHC.IO.Encoding (setLocaleEncoding, utf8) -- Testing import Test.Hspec @@ -17,6 +17,8 @@ import qualified MergeSpec main :: IO () main = do + -- force to use UTF-8 + setLocaleEncoding utf8 hspec $ do MarkdownSpec.tests MergeSpec.tests