idna

UTS #46 IDNA processing for MoonBit

unicode
idna
uts46
domain
moon add tonyfettes/idna@0.4.0
Download zip
Version
0.4.0
License
Apache-2.0
Last updated
last month
Downloads
5
README

#idna

Unicode IDNA processing for MoonBit following UTS #46 and Unicode 16.0.0.

moon add tonyfettes/idna

See the repository root README for API documentation and examples.

#
IdnaError

pub(all) suberror IdnaError {
PunycodeError(
PunycodeError
)
DisallowedCodePoint(cp~ : Int)
InvalidLabel(String)
InvalidHyphen
LabelTooLong
DomainTooLong
EmptyLabel
InvalidBidi
InvalidJoiner
InvalidAcePrefix
LeadingCombiningMark
}

Error types for IDNA processing
impl Show for IdnaError

#
to_ascii

fn to_ascii(domain : String, use_std3_ascii_rules? : Bool, check_hyphens? : Bool, check_bidi? : Bool, check_joiners? : Bool, verify_dns_length? : Bool) -> String raise IdnaError

Convert a domain name to ASCII (for DNS lookup) This is the main entry point for IDNA ToASCII operation

#
to_unicode

fn to_unicode(domain : String, use_std3_ascii_rules? : Bool, check_hyphens? : Bool, check_bidi? : Bool, check_joiners? : Bool) -> String raise IdnaError

Convert a domain name to Unicode (for display) This is the main entry point for IDNA ToUnicode operation

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io