wf,vt,vp,vd,aw should store files in utf8

This commit is contained in:
krasimir
2010-04-28 17:37:53 +00:00
parent 6e7bbf3aa8
commit 68de1cead3
2 changed files with 12 additions and 5 deletions

View File

@@ -184,3 +184,10 @@ putPointE v opts msg act = do
else when (verbAtLeast opts v) $ putStrLnE ""
return a
writeUTF8File :: FilePath -> String -> IO ()
writeUTF8File fpath content = do
h <- openFile fpath WriteMode
hSetEncoding h utf8
hPutStr h content
hClose h