Created
January 7, 2014 11:41
-
-
Save kazu-yamamoto/8298153 to your computer and use it in GitHub Desktop.
Text as euc-jp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import System.IO | |
main :: IO () | |
main = do | |
withFile "foo" WriteMode $ \hdl -> do | |
enc <- mkTextEncoding "euc-jp" | |
hSetEncoding hdl enc | |
T.hPutStrLn hdl "テスト" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment