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

Safe Haskell | None
Language | Haskell98

Data.Text.Punycode

Synopsis

- encode :: Text -> ByteString
- data PunycodeDecodeException
  - = GenericDecodeException
  - | InternalStringTooShort
  - | InputTooShort
  - | RightOfHyphenShouldBeAlphanumeric
  - | LeftOfHyphenShouldBeBasic
  - | CantStartWithDash
  - | InvalidCodePoint
- decode :: ByteString -> Either PunycodeDecodeException Text

# Documentation

encode :: Text -> ByteString

Encode a string into its ascii form

data PunycodeDecodeException

Constructors

GenericDecodeException |
InternalStringTooShort |
InputTooShort |
RightOfHyphenShouldBeAlphanumeric |
LeftOfHyphenShouldBeBasic |
CantStartWithDash |
InvalidCodePoint |

Instances

Eq PunycodeDecodeException |
Show PunycodeDecodeException |
Exception PunycodeDecodeException |
Typeable * PunycodeDecodeException |

decode :: ByteString -> Either PunycodeDecodeException Text

Decode a string into its unicode form