From 68de1cead3a64d42e21b8668415596925b284b18 Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 28 Apr 2010 17:37:53 +0000 Subject: wf,vt,vp,vd,aw should store files in utf8 --- src/compiler/GF/Infra/UseIO.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler/GF/Infra/UseIO.hs') diff --git a/src/compiler/GF/Infra/UseIO.hs b/src/compiler/GF/Infra/UseIO.hs index bb1a75b6e..3940e6be1 100644 --- a/src/compiler/GF/Infra/UseIO.hs +++ b/src/compiler/GF/Infra/UseIO.hs @@ -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 -- cgit v1.2.3