See Also: IdnMapping Members
An Internet domain name consists of one or more parts, called domain name labels, separated by label separators. For example, the domain name "www.proseware.com" consists of the labels, "www", "proseware", and "com", separated by periods. Standard domain names consist of designated characters in the US-ASCII (or Basic Latin) character range, from U+0021 to U+007E. To facilitate Internet usage in cultures that do not use the US-ASCII character set, the Internationalizing Domain Names in Applications (IDNA) standard was adopted in 2003 to support the inclusion of Unicode characters outside the US-ASCII character range. However, name servers and domain name resolution continue to rely on characters within the US-ASCII character range.
The IDNA mechanism uses Punycode to map an internationalized domain name that contains Unicode characters outside the US-ASCII character range to the US-ASCII character range supported by the domain name system. The IDNA mechanism is used to convert only domain names, not data transmitted over the Internet.
In the net_v45, the System.Globalization.IdnMapping class supports different versions of the IDNA standard, depending on the operating system in use:
When run on win8, it supports the 2008 version of the IDNA standard outlined by tp://go.microsoft.com/fwlink/?LinkId=231875.
When run on earlier versions of the Windows operating system, it supports the 2003 version of the standard outlined by tp://go.microsoft.com/fwlink/?LinkId=158110.
See tp://go.microsoft.com/fwlink/?LinkId=232459 for the differences in the way these standards handle particular sets of characters.
The erload:System.Globalization.IdnMapping.GetAscii method normalizes a domain name, converts the normalized name to a representation that consists of displayable Unicode characters in the US-ASCII code point range (U+0020 to U+007E), and prepends an ASCII-compatible encoding (ACE) prefix ("xn--") to each label. The IdnMapping.GetUnicode(string) method restores the domain name labels converted by the erload:System.Globalization.IdnMapping.GetAscii method.
If the string to be converted includes the label separator characters IDEOGRAPHIC FULL STOP (U+3002), FULLWIDTH FULL STOP (U+FF0E), and HALFWIDTH IDEOGRAPHIC FULL STOP (U+FF61), the IdnMapping.GetAscii(string) method converts them to the label separator FULL STOP (period, U+002E). The IdnMapping.GetUnicode(string) method, however, does not restore the original label separator character.