UTS #46 IDNA processing for MoonBit
moon add moonbit-community/unicode-idnalet ascii = try! @idna.to_ascii(
"ÖBB.at",
check_idna2008=true,
check_contexto=true,
)
// "xn--bb-eka.at"pub(all) suberror IdnaError {
PunycodeError(PunycodeError)
DisallowedCodePoint(cp~ : Int)
InvalidLabel(String)
InvalidHyphen
LabelTooLong
DomainTooLong
EmptyLabel
InvalidBidi
InvalidJoiner
InvalidContextO(cp~ : Int)
InvalidAcePrefix
LeadingCombiningMark
}fn to_ascii(domain : String, use_std3_ascii_rules? : Bool, check_hyphens? : Bool, check_bidi? : Bool, check_joiners? : Bool, check_idna2008? : Bool, check_contexto? : Bool, verify_dns_length? : Bool) -> String raise IdnaErrorfn to_unicode(domain : String, use_std3_ascii_rules? : Bool, check_hyphens? : Bool, check_bidi? : Bool, check_joiners? : Bool, check_idna2008? : Bool, check_contexto? : Bool) -> String raise IdnaErrorInstall
Download zipUTS #46 IDNA processing for MoonBit