summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/IO/hSetEncoding002.hs
blob: 35c4e1ce19d06be6ae8cf92f52c8d515be1ac9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- test for #4066

import System.IO

import GHC.IO.FD as FD (stdout)
import GHC.IO.Handle.FD as FD (fdToHandle)
import GHC.IO.Handle ( mkDuplexHandle )

main = do
  h <- mkDuplexHandle FD.stdout "stdout" Nothing noNewlineTranslation
  hSetEncoding h utf8
  hPutStrLn h "รถ"
  hClose h