Scenario: Transforming the character encoding of a file - 6.1

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.1
EnrichProdName
Talend Open Studio for Big Data
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.