encoding-0.10.2: A library for various character encodings

Safe Haskell | None
Language | Haskell2010

Data.Encoding.UTF16

Description

This module implements UTF-16 encoding and decoding as in RFC 2781. See http://en.wikipedia.org/wiki/UTF-16 for more information.

# Documentation

data UTF16 Source #

Constructors

UTF16 | Decodes big and little endian, encodes big endian.
UTF16BE | Big endian decoding and encoding, fails if the string isn't actually big endian.
UTF16LE | Little endian decoding and encoding.

#### Instances

Instances details

Encoding UTF16 Source # |
Instance details Defined in Data.Encoding.UTF16 Methods decodeChar :: ByteSource m => UTF16 -> m Char Source # encodeChar :: ByteSink m => UTF16 -> Char -> m () Source # decode :: ByteSource m => UTF16 -> m String Source # encode :: ByteSink m => UTF16 -> String -> m () Source # encodeable :: UTF16 -> Char -> Bool Source #
Show UTF16 Source # |
Instance details Defined in Data.Encoding.UTF16 Methods showsPrec :: Int -> UTF16 -> ShowS Source # show :: UTF16 -> String Source # showList :: [UTF16] -> ShowS Source #
Eq UTF16 Source # |
Instance details Defined in Data.Encoding.UTF16 Methods (==) :: UTF16 -> UTF16 -> Bool Source # (/=) :: UTF16 -> UTF16 -> Bool Source #