UseEncoding transform

This topic tells you about the Application Accelerator UseEncoding transform in Tanzu Application Platform (commonly known as TAP).

When considering files in textual form, for example, when doing text replacement with the ReplaceText transform, the engine must decide which encoding to use.

By default, UTF-8 is assumed. If any files must be handled differently, use the UseEncoding transform to annotate them with an explicit encoding.

UseEncoding returns an error if you apply encoding to files that have already been explicitly configured with a particular encoding.

Syntax reference

UseEncoding({encoding: ENCODING})

Where ENCODING is the type of encoding you want to use. Supported encoding names include, for example, UTF-8, US-ASCII, and ISO-8859-1.

Example

UseEncoding is typically used as an upfront transform to, for example, ReplaceText in a chain:

UseEnconding('ISO-8859-1')
ReplaceText({text: "hello", with: #howToSayHello})

See also

check-circle-line exclamation-circle-line close-line
Scroll to top icon