Reference documentation and code samples for the Google Cloud Natural Language v1 API enum 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.
If EncodingType is not specified, encoding-dependent information (such as
begin_offset) will be set at -1.
Utf16
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
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.
Utf8
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The latest version available for the Google Cloud Natural Language v1 API is 3.7.0, and the page includes documentation for multiple older versions, ranging down to version 2.2.0."],["The `EncodingType` enum is part of the `Google.Cloud.Language.V1` namespace within the `Google.Cloud.Language.V1.dll` assembly, and represents the text encoding used to process output."],["The API recommends providing an `EncodingType` to ensure proper handling of encoding-dependent information like `begin_offset` for languages with different text encodings."],["There are four encoding types available: `None` (default if not specified), `Utf16`, `Utf32`, and `Utf8`, which determine how encoding-dependent information is calculated."],["Each encoding type, such as `Utf8`, `Utf16` and `Utf32` correspond to specific languages, like `C++` and `Go` for `Utf8`, with native support for each type."]]],[]]