hslua-1.3.0.1: Bindings to Lua, an embeddable scripting language
Copyright© 2018-2020 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb+hslua@zeitkraut.de>
Stabilitybeta
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Foreign.Lua.Utf8

Description

Encoding and decoding of String to and from UTF8.

Synopsis

Documentation

toString :: ByteString -> String Source #

Decode ByteString to String using UTF-8. Invalid input bytes are replaced with the Unicode replacement character U+FFFD.

toText :: ByteString -> Text Source #

Decode ByteString to Text using UTF-8. Invalid input bytes are replaced with the Unicode replacement character U+FFFD.

fromString :: String -> ByteString Source #

Encode String to ByteString using UTF-8.

fromText :: Text -> ByteString Source #

Encode Text to ByteString using UTF-8.