serialise-0.2.6.0: A binary serialisation library for Haskell values.
Safe Haskell None
Language Haskell2010

Codec.Serialise.Internal.GeneralisedUTF8

Contents

Synopsis

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.

Utilities

isValid :: UTF8Encoding -> [ Word8 ] -> Bool Source #

Is the given byte sequence valid under the given encoding?