Last active
August 13, 2017 22:08
-
-
Save ear/7dd6c4d045f05ebad9f923b671c370b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module Main where | |
import System.Environment (getArgs) | |
import Data.ByteString (ByteString) | |
import qualified Data.ByteString as B | |
import Data.Text.ICU.Convert | |
import Data.Text.Encoding as T | |
main = do | |
[filename] <- getArgs | |
kiss <- B.readFile filename | |
c <- open "SHIFT_JIS" Nothing | |
B.putStrLn . T.encodeUtf8 . toUnicode c $ kiss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment