From 58a870e26606978e24e6e89378b213855b0debc9 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Sat, 16 Feb 2008 09:03:06 +0100 Subject: StdinReader: add utf8 support darcs-hash:20080216080306-d6583-13891ea92ae2705fabc3221808a31fc11c6b4095.gz --- Plugins/StdinReader.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3