# UnicodeDecode

public final class **UnicodeDecode** Decodes each string in \`input\` into a sequence of Unicode code points.


The character codepoints for all strings are returned using a single vector
\`char_values\`, with strings expanded to characters in row-major order.


The \`row_splits\` tensor indicates where the codepoints for
each input string begin and end within the \`char_values\` tensor.
In particular, the values for the \`i\`th
string (in row-major order) are stored in the slice
\`\[row_splits\[i\]:row_splits\[i+1\]\]\`. Thus:

- \`char_values\[row_splits\[i\]+j\]\` is the Unicode codepoint for the \`j\`th character in the \`i\`th string (in row-major order).
- \`row_splits\[i+1\] - row_splits\[i\]\` is the number of characters in the \`i\`th string (in row-major order).

<br />

<br />

<br />

### Nested Classes

|---|---|---|---|
| class | [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) || Optional attributes for `https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode` |

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Integer\> | [charValues](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#charValues())() A 1D int32 Tensor containing the decoded codepoints. |
| static \<T extends Number\> [UnicodeDecode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode)\<T\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<java.lang.String>,%20java.lang.String,%20java.lang.Class<T>,%20org.tensorflow.op.core.UnicodeDecode.Options...))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> input, String inputEncoding, Class\<T\> Tsplits, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) options) Factory method to create a class wrapping a new UnicodeDecode operation. |
| static [UnicodeDecode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode)\<Long\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<java.lang.String>,%20java.lang.String,%20org.tensorflow.op.core.UnicodeDecode.Options...))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> input, String inputEncoding, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) options) Factory method to create a class wrapping a new UnicodeDecode operation using default output types. |
| static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) | [errors](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#errors(java.lang.String))(String errors) |
| static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) | [replaceControlCharacters](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#replaceControlCharacters(java.lang.Boolean))(Boolean replaceControlCharacters) |
| static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) | [replacementChar](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#replacementChar(java.lang.Long))(Long replacementChar) |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [rowSplits](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode#rowSplits())() A 1D int32 tensor containing the row splits. |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<Integer\>
**charValues**
()

A 1D int32 Tensor containing the decoded codepoints.

#### public static [UnicodeDecode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode)\<T\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> input, String inputEncoding, Class\<T\> Tsplits, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) options)

Factory method to create a class wrapping a new UnicodeDecode operation.

##### Parameters

| scope | current scope |
| input | The text to be decoded. Can have any shape. Note that the output is flattened to a vector of char values. |
| inputEncoding | Text encoding of the input strings. This is any of the encodings supported by ICU ucnv algorithmic converters. Examples: \`"UTF-16", "US ASCII", "UTF-8"\`. |
| options | carries optional attributes values |
|---|---|

##### Returns

- a new instance of UnicodeDecode

#### public static [UnicodeDecode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode)\<Long\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<String\> input, String inputEncoding, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options) options)

Factory method to create a class wrapping a new UnicodeDecode operation using default output types.

##### Parameters

| scope | current scope |
| input | The text to be decoded. Can have any shape. Note that the output is flattened to a vector of char values. |
| inputEncoding | Text encoding of the input strings. This is any of the encodings supported by ICU ucnv algorithmic converters. Examples: \`"UTF-16", "US ASCII", "UTF-8"\`. |
| options | carries optional attributes values |
|---|---|

##### Returns

- a new instance of UnicodeDecode

#### public static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options)
**errors**
(String errors)

<br />

##### Parameters

| errors | Error handling policy when there is invalid formatting found in the input. The value of 'strict' will cause the operation to produce a InvalidArgument error on any invalid input formatting. A value of 'replace' (the default) will cause the operation to replace any invalid formatting in the input with the \`replacement_char\` codepoint. A value of 'ignore' will cause the operation to skip any invalid formatting in the input and produce no corresponding output character. |
|---|---|

#### public static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options)
**replaceControlCharacters**
(Boolean replaceControlCharacters)

<br />

##### Parameters

| replaceControlCharacters | Whether to replace the C0 control characters (00-1F) with the \`replacement_char\`. Default is false. |
|---|---|

#### public static [UnicodeDecode.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UnicodeDecode.Options)
**replacementChar**
(Long replacementChar)

<br />

##### Parameters

| replacementChar | The replacement character codepoint to be used in place of any invalid formatting in the input when \`errors='replace'\`. Any valid unicode codepoint may be used. The default value is the default unicode replacement character is 0xFFFD or U+65533.) |
|---|---|

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>
**rowSplits**
()

A 1D int32 tensor containing the row splits.