Language

Normalizer2.GetInstance(Stream, String, Normalizer2+Mode) Method

Definition

Returns a Normalizer2 instance which uses the specified data file (an ICU data file if data=null, or else custom binary data) and which composes or decomposes text according to the specified mode.

[Android.Runtime.Register("getInstance", "(Ljava/io/InputStream;Ljava/lang/String;Landroid/icu/text/Normalizer2$Mode;)Landroid/icu/text/Normalizer2;", "", ApiSince=24)]
public static Android.Icu.Text.Normalizer2? GetInstance(System.IO.Stream? data, string? name, Android.Icu.Text.Normalizer2.Mode? mode);
[<Android.Runtime.Register("getInstance", "(Ljava/io/InputStream;Ljava/lang/String;Landroid/icu/text/Normalizer2$Mode;)Landroid/icu/text/Normalizer2;", "", ApiSince=24)>]
static member GetInstance : System.IO.Stream * string * Android.Icu.Text.Normalizer2.Mode -> Android.Icu.Text.Normalizer2

Parameters

data
Stream

the binary, big-endian normalization (.nrm file) data, or null for ICU data

name
String

"nfc", "nfkc", "nfkc_cf", or another built-in or custom data name. The built-in "nfkc_scf" data is not available on all Android versions.

mode
Normalizer2.Mode

normalization mode (compose or decompose etc.)

Returns

the requested Normalizer2, if successful

Attributes

Remarks

This method was deprecated in API level 31. Don't use because the binary data format is not stable across API levels.

Returns a Normalizer2 instance which uses the specified data file (an ICU data file if data=null, or else custom binary data) and which composes or decomposes text according to the specified mode. Returns an unmodifiable instance. Use data=null for data files that are part of ICU's own data. Use name="nfc" and COMPOSE/DECOMPOSE for Unicode standard NFC/NFD. Use name="nfkc" and COMPOSE/DECOMPOSE for Unicode standard NFKC/NFKD. Use name="nfkc_cf" and COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. When data is non-null, it is read and closed before the cache is checked. Custom normalization data is cached using the provided name as the key. A IOException from reading or closing the input is wrapped in an ICUUncheckedIOException.

Android reference for android.icu.text.Normalizer2.getInstance.

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