Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Parser.Lathe.Encoding.UTF32
Contents
Description
Functions for parsing UTF-32, both little-endian and big-endian.
Synopsis
- utf32BOM :: e -> e -> Parser e ByteOrder
- newtype UTF32Point = UTF32Point Word32
- fromUtf32 :: UTF32Point -> Char
- isSurrogate :: UTF32Point -> Bool
- unitUtf32BE :: e -> e -> Parser e UTF32Point
- unitUtf32LE :: e -> e -> Parser e UTF32Point
Byte-order mark
Consume 4 bytes that represent a UTF-32 byte-order mark and return
the corresponding ByteOrder
.
UTF-32
isSurrogate :: UTF32Point -> Bool Source #
Check whether a code point lies in the surrogate range (U+D800
to U+DFFF
).
Parsers
Arguments
:: e | Code unit is greater than |
-> e | Reached end. |
-> Parser e UTF32Point |
Consume 4 bytes that represents a big-endian UTF-32 character.
Arguments
:: e | Code unit is greater than |
-> e | Reached end. |
-> Parser e UTF32Point |
Consume 4 bytes that represents a little-endian UTF-32 character.