IDNA.GetUTS46Instance(IDNAOptions) Method

Definition

Returns an IDNA instance which implements UTS #46.

[Android.Runtime.Register("getUTS46Instance", "(I)Landroid/icu/text/IDNA;", "", ApiSince=24)]
public static Android.Icu.Text.IDNA? GetUTS46Instance (Android.Icu.Text.IDNAOptions options);
[<Android.Runtime.Register("getUTS46Instance", "(I)Landroid/icu/text/IDNA;", "", ApiSince=24)>]
static member GetUTS46Instance : Android.Icu.Text.IDNAOptions -> Android.Icu.Text.IDNA

Parameters

options
IDNAOptions

Bit set to modify the processing and error checking.

Returns

the UTS #46 IDNA instance, if successful

Attributes

Remarks

Returns an IDNA instance which implements UTS #46. Returns an unmodifiable instance, owned by the caller. Cache it for multiple operations, and delete it when done. The instance is thread-safe, that is, it can be used concurrently.

UTS #46 defines Unicode IDNA Compatibility Processing, updated to the latest version of Unicode and compatible with both IDNA2003 and IDNA2008.

The worker functions use transitional processing, including deviation mappings, unless NONTRANSITIONAL_TO_ASCII or NONTRANSITIONAL_TO_UNICODE is used in which case the deviation characters are passed through without change.

Disallowed characters are mapped to U+FFFD.

Operations with the UTS #46 instance do not support the ALLOW_UNASSIGNED option.

By default, the UTS #46 implementation allows all ASCII characters (as valid or mapped). When the USE_STD3_RULES option is used, ASCII characters other than letters, digits, hyphen (LDH) and dot/full stop are disallowed and mapped to U+FFFD.

Java documentation for android.icu.text.IDNA.getUTS46Instance(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to