# Cloud Natural Language V2 Client - Class EncodingType (1.2.1)

1.2.1 (latest) 1.2.0 1.1.4 1.0.1 0.34.3 0.33.0 0.32.7 0.31.3 0.30.2 0.29.0 0.28.5 Reference documentation and code samples for the Cloud Natural Language V2 Client class EncodingType.

Represents the text encoding that the caller uses to process the output.

Providing an `EncodingType` is recommended because the API provides the
beginning offsets for various outputs, such as tokens and mentions, and
languages that natively use different text encodings may access offsets
differently.

Protobuf type `google.cloud.language.v2.EncodingType`

## Namespace

Google \\ Cloud \\ Language \\ V2

## Methods

### static::name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` |

### static::value

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `mixed` |

## Constants

### NONE

    Value: 0

If `EncodingType` is not specified, encoding-dependent information (such as
`begin_offset`) will be set at `-1`.

Generated from protobuf enum `NONE = 0;`

### UTF8

    Value: 1

Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-8 encoding of the input. C++ and Go are examples of languages
that use this encoding natively.

Generated from protobuf enum `UTF8 = 1;`

### UTF16

    Value: 2

Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-16 encoding of the input. Java and JavaScript are examples of
languages that use this encoding natively.

Generated from protobuf enum `UTF16 = 2;`

### UTF32

    Value: 3

Encoding-dependent information (such as `begin_offset`) is calculated based
on the UTF-32 encoding of the input. Python is an example of a language
that uses this encoding natively.

Generated from protobuf enum `UTF32 = 3;`