summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2008-02-16 09:04:21 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2008-02-16 09:04:21 +0100
commita2dd80b97cf09e8e11c8c99e3bc876ef9f7628f7 (patch)
treed33fd424fa095526d6d2a73e87bd253927c3f74b /Plugins
parent58a870e26606978e24e6e89378b213855b0debc9 (diff)
downloadxmobar-a2dd80b97cf09e8e11c8c99e3bc876ef9f7628f7.tar.gz
xmobar-a2dd80b97cf09e8e11c8c99e3bc876ef9f7628f7.tar.bz2
PipeReader: add utf8 support
darcs-hash:20080216080421-d6583-347341c11af83ddc1c543832c5d524c13d4abd32.gz
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/PipeReader.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Plugins/PipeReader.hs b/Plugins/PipeReader.hs
index 695f1e6..6c84f71 100644
--- a/Plugins/PipeReader.hs
+++ b/Plugins/PipeReader.hs
@@ -3,7 +3,7 @@
-- Module : Plugins.PipeReader
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
---
+--
-- Maintainer : Andrea Rossato <andrea.rossato@unibz.it>
-- Stability : unstable
-- Portability : unportable
@@ -15,14 +15,15 @@
module Plugins.PipeReader where
import System.IO
+import qualified System.IO.UTF8 as U
import Plugins
data PipeReader = PipeReader String String
deriving (Read, Show)
-instance Exec PipeReader where
+instance Exec PipeReader where
alias (PipeReader _ a) = a
start (PipeReader p _) cb = do
h <- openFile p ReadMode
- forever (hGetLine h >>= cb)
+ forever (U.hGetLine h >>= cb)
where forever a = a >> forever a