Java.Net.IDN.ToASCII Method
Transform a Unicode String to ASCII Compatible Encoding String according to the algorithm defined in .

Syntax

[Android.Runtime.Register("toASCII", "(Ljava/lang/String;I)Ljava/lang/String;", "")]
public static string ToASCII (string input, [Android.Runtime.GeneratedEnum] IDNFlags flags)

Parameters

input
the Unicode name
flags
0, ALLOW_UNASSIGNED, USE_STD3_ASCII_RULES, or ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif input does not conform to

Remarks

Transform a Unicode String to ASCII Compatible Encoding String according to the algorithm defined in .

If the transformation fails (because the input is not a valid IDN), an exception will be thrown.

This method can handle either an individual label or an entire domain name. In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop). All of these will become U+002E (full stop) in the result.

[Android Documentation]

Requirements

Namespace: Java.Net
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9