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.
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
.
UseEncoding
is typically used as an upfront transform to, for example, ReplaceText in a chain:
UseEnconding('ISO-8859-1')
ReplaceText({text: "hello", with: #howToSayHello})