# Natural Language V1 API - Module Google::Cloud::Language::V1::EncodingType (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.11.0 0.10.2 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.5 Reference documentation and code samples for the Natural Language V1 API module Google::Cloud::Language::V1::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.

## Constants

### NONE

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

### 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.

### 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.

### 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.