summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2008-02-16 09:03:06 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2008-02-16 09:03:06 +0100
commit58a870e26606978e24e6e89378b213855b0debc9 (patch)
treebbb8024acb847cb39ef8d3f0b27a9fa1c3551a72
parent6dd78a0c81f2beba8167adb1e07b4b16b493f2a7 (diff)
downloadxmobar-58a870e26606978e24e6e89378b213855b0debc9.tar.gz
xmobar-58a870e26606978e24e6e89378b213855b0debc9.tar.bz2
StdinReader: add utf8 support
darcs-hash:20080216080306-d6583-13891ea92ae2705fabc3221808a31fc11c6b4095.gz
-rw-r--r--Plugins/StdinReader.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Plugins/StdinReader.hs b/Plugins/StdinReader.hs
index d7ec676..4283a96 100644
--- a/Plugins/StdinReader.hs
+++ b/Plugins/StdinReader.hs
@@ -18,6 +18,7 @@ import Prelude hiding (catch)
import System.Posix.Process
import System.Exit
import System.IO
+import qualified System.IO.UTF8 as U
import Control.Exception (catch)
import Plugins
@@ -26,7 +27,7 @@ data StdinReader = StdinReader
instance Exec StdinReader where
start StdinReader cb = do
- cb =<< catch (hGetLine stdin) (\e -> do hPrint stderr e; return "")
+ cb =<< catch (U.hGetLine stdin) (\e -> do hPrint stderr e; return "")
eof <- hIsEOF stdin
if eof
then exitImmediately ExitSuccess