gnuidn-0.2: Bindings for GNU IDN

Safe Haskell | None

Data.Text.IDN.StringPrep

Contents

- Stringprep
- Profiles

Synopsis

- data Flags = Flags {
  - enableNFKC :: Bool
  - enableBidi :: Bool
  - allowUnassigned :: Bool
  }
- data Error
- defaultFlags :: Flags
- stringprep :: Profile -> Flags -> Text -> Either Error Text
- data Profile
- iscsi :: Profile
- kerberos5 :: Profile
- nameprep :: Profile
- sasl :: Profile
- saslAnonymous :: Profile
- trace :: Profile
- xmppNode :: Profile
- xmppResource :: Profile

# Stringprep

data Flags Source

Constructors

Flags |

Fields

enableNFKC :: Bool

  Enable the NFKC normalization, as well as selecting the NFKC case folding tables. Usually the profile specifies BIDI and NFKC settings, and applications should not override it unless in special situations.

enableBidi :: Bool

  Enable the BIDI step. Usually the profile specifies BIDI and NFKC settings, and applications should not override it unless in special situations.

allowUnassigned :: Bool

  If false, `stringprep` will return an error if the input contains characters not assigned to the profile.

Instances

Eq Flags |
Show Flags |

data Error Source

Instances

Eq Error |
Show Error |

defaultFlags :: Flags Source

    defaultFlags = Flags True True False

stringprep :: Profile -> Flags -> Text -> Either Error Text Source

# Profiles

data Profile Source

iscsi :: Profile Source

iSCSI (RFC 3722)

kerberos5 :: Profile Source

Kerberos 5

nameprep :: Profile Source

Nameprep (RFC 3491)

sasl :: Profile Source

SASLprep (RFC 4013)

saslAnonymous :: Profile Source

Draft SASL ANONYMOUS

trace :: Profile Source

xmppNode :: Profile Source

XMPP node (RFC 3920)

xmppResource :: Profile Source

XMPP resource (RFC 3920)