File encoding is automatically detected among the following:

  • UTF8 with BOM

  • UTF8

  • UTF16 LE with BOM

  • UTF16 BE with BOM

  • ASCII/ANSI (default)

Tag Attributes

Attribute Name

Attribute Value

Name

Variable name (see SetVar: Define a variable) Required

FilePath

Input file path.

Example script

<ytriaAutomation Application="sapio365">
    <SetVarFromTextFile name="MyVarFromFileUTF8" filepath="C:\utf8.txt"/>
    <Echo value="{%MyVarFromFileUTF8%}"/>
    <SetVarFromTextFile name="MyVarFromFileUTF16" filepath="C:\utf16.txt"/>
    <Echo value="{%MyVarFromFileUTF16%}"/>
</ytriaAutomation>
XML