1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-24 05:45:11 +03:00

Merge pull request #211 from aelve/sectore/force-utf8

Force use of `UTF-8`
This commit is contained in:
Jens Krause 2017-10-08 18:17:55 +02:00 committed by GitHub
commit f0565b1eae
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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