punycode-0.5.1: Encode unicode strings to ascii forms according to RFC 3492

Safe HaskellNone

Data.Text.Punycode

Synopsis

Documentation

encode :: String -> ByteStringSource

Encode a string into its ascii form

decode :: ByteString -> StringSource

Decode a string into its unicode form

internationalize :: String -> ByteStringSource

Convenience function for internationalized domain names. If there is at least one non-ascii character, this function will encode the input and prepend "xn--" to the output string. Otherwise, it will return the string untouched. Note that this function does not run nameprep (e.g. it operates on pre-prepped strings)