diff options
Diffstat (limited to 'src/compiler/GF/Infra')
| -rw-r--r-- | src/compiler/GF/Infra/UseIO.hs | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
