Punycodes a domain name.

Namespace:  JHSoftware
Assembly:  JHSoftware.DnsClient (in JHSoftware.DnsClient.dll) Version: 1.0.1.0 (1.0.1.0)

Syntax

C#
public static string IdnEncode(
	string domainName
)
Visual Basic (Declaration)
Public Shared Function IdnEncode ( _
	domainName As String _
) As String

Parameters

domainName
Type: System..::.String
The domain name (in native form) to be encoded.

Return Value

Encoded domain name.

Remarks

Labels (segment between dots in domain name) that contains non-english characters will by puny-encoded. Resulting labels will begin with 'xn--' followed by encoded characters.

For more information about IDNs (Internationalized Domain Names) see KB1032.

See Also