tChangeFileEncoding
Transforms the character encoding of a given file and generates a new file with the
transformed character encoding.
tChangeFileEncodingchanges the encoding of a given file.
tChangeFileEncoding Standard properties
These properties are used to configure tChangeFileEncoding running in the Standard Job framework.
The Standard
tChangeFileEncoding component belongs to the Data Quality and the File families.
The component in this framework is generally available.
Basic settings
Use Custom Input Encoding |
Select this check box to customize input encoding type. When it is |
Encoding |
From this list of character encoding types, you can select one of |
Input File Name |
Path of the input file. |
Output File Name |
Path of the output file. |
Advanced settings
Create directory if does not exist |
This check box is selected by default. It creates a directory to hold the |
tStatCatcher Statistics |
Select this check box to collect log data at the component level. |
Global Variables
Global Variables |
EXISTS: the result of whether a specified file exists.
FILENAME: the name of the file processed. This is an
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component can be used as standalone component. |
Scenario: Transforming the character encoding of a file
of a text file and generates a new file with the new character encoding.
Procedure
-
Drop a tChangeFileEncoding component onto the
design workspace. -
Double-click the tChangeFileEncoding
component to display its Basic settings view. -
Select Use Custom Input Encoding check box.
Set the Encoding type to GB2312. -
In the Input File Name field, enter the file
path or browse to the input file. -
In the Output File Name field, enter the file
path or browse to the output file. -
Select CUSTOM from the second Encoding list and enter UTF-16
in the text field. -
Press F6 to execute the Job.
The encoding type of the file in.txt is transformed and
out.txt is generated with the UTF-16 encoding type.