Export Unicode and newline functionality from System.IO; update Haddock docs
[ghc-base.git] / GHC / IO / Handle.hs
index 1531b4a..969b805 100644 (file)
@@ -246,8 +246,7 @@ hSetBuffering handle mode =
 -- hSetEncoding
 
 -- | The action 'hSetEncoding' @hdl@ @encoding@ changes the text encoding
--- for the handle @hdl@ to @encoding@.  Encodings are available from the
--- module "GHC.IO.Encoding".  The default encoding when a 'Handle' is
+-- for the handle @hdl@ to @encoding@.  The default encoding when a 'Handle' is
 -- created is 'localeEncoding', namely the default encoding for the current
 -- locale.
 --
@@ -255,6 +254,9 @@ hSetBuffering handle mode =
 -- stop further encoding or decoding on an existing 'Handle', use
 -- 'hSetBinaryMode'.
 --
+-- 'hSetEncoding' may need to flush buffered data in order to change
+-- the encoding.
+--
 hSetEncoding :: Handle -> TextEncoding -> IO ()
 hSetEncoding hdl encoding = do
   withHandle "hSetEncoding" hdl $ \h_@Handle__{..} -> do