Scenario: Transforming the character encoding of a file - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

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.

  1. Drop a tChangeFileEncoding component onto the design workspace.

  2. Double-click the tChangeFileEncoding component to display its Basic settings view.

  3. Select Use Custom Input Encoding check box. Set the Encoding type to GB2312.

  4. In the Input File Name field, enter the file path or browse to the input file.

  5. In the Output File Name field, enter the file path or browse to the output file.

  6. Select CUSTOM from the second Encoding list and enter UTF-16 in the text field.

  7. 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.