Safe Haskell | None |
---|---|
Language | Haskell2010 |
- encodeGenUTF8 :: String -> (SlicedByteArray, UTF8Encoding)
- data UTF8Encoding
- decodeGenUTF8 :: ByteArray -> String
- isSurrogate :: Char -> Bool
- isValid :: UTF8Encoding -> [Word8] -> Bool
Documentation
encodeGenUTF8 :: String -> (SlicedByteArray, UTF8Encoding) Source #
Encode a string as (generalized) UTF-8. In addition to the encoding, we return a flag indicating whether the encoded string contained any surrogate characters, in which case the output is generalized UTF-8.
data UTF8Encoding Source #
decodeGenUTF8 :: ByteArray -> String Source #