
Component family |
File/Management |
|
Function |
tChangeFileEncoding changes the |
|
Purpose |
tChangeFileEncoding transforms |
|
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. |
Usage |
This component can be used as standalone component. |
|
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 Talend Studio |
|
Log4j |
The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
|
Limitation |
n/a |
This Java scenario describes a very simple Job that transforms the character encoding
of a text file and generates a new file with the new character encoding.
-
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.