idna

package
v0.0.0-...-f6cbe64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package idna implements IDNA2008 using the compatibility processing defined by UTS (Unicode Technical Standard) #46, which defines a standard to deal with the transition from IDNA2003.

IDNA2008 (Internationalized Domain Names for Applications), is defined in RFC 5890, RFC 5891, RFC 5892, RFC 5893 and RFC 5894. UTS #46 is defined in http://www.unicode.org/reports/tr46. See http://unicode.org/cldr/utility/idna.jsp for a visualization of the differences between these two standards.

Index

Constants

View Source
const UnicodeVersion = "9.0.0"

UnicodeVersion is the Unicode version from which the tables in this package are derived.

Variables

View Source
var (
	// Resolve is the recommended profile for resolving domain names.
	// The configuration of this profile may change over time.
	Resolve = resolve

	// Transitional defines a profile that implements the Transitional mapping
	// as defined in UTS #46 with no additional constraints.
	Transitional = transitional

	// NonTransitional defines a profile that implements the Transitional
	// mapping as defined in UTS #46 with no additional constraints.
	NonTransitional = nonTransitional
)

Functions

This section is empty.

Types

type Profile

type Profile struct {
	Transitional    bool
	IgnoreSTD3Rules bool
	IgnoreDNSLength bool
}

A Profile defines the configuration of a IDNA mapper.

func (*Profile) String

func (p *Profile) String() string

String reports a string with a description of the profile for debugging purposes. The string format may change with different versions.

func (*Profile) ToASCII

func (p *Profile) ToASCII(s string) (string, error)

func (*Profile) ToUnicode

func (p *Profile) ToUnicode(s string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL