| Portability | GHC-only |
|---|---|
| Stability | experimental |
| Maintainer | kudahkukarek@gmail.com |
| Safe Haskell | Trustworthy |
Data.Text.Lazy.Encoding.Locale
Description
This module provides functions to encode and decode Text
to/from ByteString using TextEncoding
For performance, Text's native encoding functions are used if the conditions are right (LF NewlineMode and UTF encoding).
- decodeLocale :: ByteString -> IO Text
- encodeLocale :: Text -> IO ByteString
- decodeLocale' :: TextEncoding -> NewlineMode -> ByteString -> IO Text
- encodeLocale' :: TextEncoding -> NewlineMode -> Text -> IO ByteString
- decodeFromHandle :: Handle -> ByteString -> IO Text
- encodeFromHandle :: Handle -> Text -> IO ByteString
Documentation
decodeLocale :: ByteString -> IO TextSource
Decode ByteString to Text using current locale
encodeLocale :: Text -> IO ByteStringSource
Encode Text to ByteString using current locale
decodeLocale' :: TextEncoding -> NewlineMode -> ByteString -> IO TextSource
Decode ByteString to Text using supplied TextEncoding and NewlineMode
encodeLocale' :: TextEncoding -> NewlineMode -> Text -> IO ByteStringSource
Encode Text to ByteString using supplied TextEncoding and NewlineMode
decodeFromHandle :: Handle -> ByteString -> IO TextSource
Decode ByteString to Text using Handles TextEncoding and NewlineMode
encodeFromHandle :: Handle -> Text -> IO ByteStringSource
Encode Text to ByteString using Handles TextEncoding and NewlineMode