hSetBinaryMode

hSetBinaryMode :: Handle -> Bool -> IO ()
base System.IO, base GHC.IO.Handle
Select binary mode (True) or text mode (False) on a open handle. (See also openBinaryFile.) This has the same effect as calling hSetEncoding with latin1, together with hSetNewlineMode with noNewlineTranslation.