UTF-8

From HaskellWiki
Revision as of 09:24, 21 July 2008 by EricKow (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


The simplest solution seems to be to use the utf8-string package from Galois. It provides a drop-in replacement for System.IO

import System.IO.UTF8
import Prelude hiding (getContents, putStrLn)

main =
 do putStrLn "what is your name? "
    name <- getContents
    putStrLn $ "hello, " ++ name ++ "!"