diff options
Diffstat (limited to 'Database/Handle.hs')
-rw-r--r-- | Database/Handle.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Database/Handle.hs b/Database/Handle.hs index 8790b3218..748feaa97 100644 --- a/Database/Handle.hs +++ b/Database/Handle.hs @@ -19,6 +19,7 @@ module Database.Handle ( ) where import Utility.Exception +import Utility.FileSystemEncoding import Database.Persist.Sqlite import qualified Database.Sqlite as Sqlite @@ -66,6 +67,10 @@ openDb :: FilePath -> TableName -> IO DbHandle openDb db tablename = do jobs <- newEmptyMVar worker <- async (workerThread (T.pack db) tablename jobs) + + -- work around https://github.com/yesodweb/persistent/issues/474 + liftIO setConsoleEncoding + return $ DbHandle worker jobs {- This is optional; when the DbHandle gets garbage collected it will |