tChangeFileEncoding

One Star

tChangeFileEncoding

Hello,
I am trying to use the tChangeFileEncoding component without specifying the input encoding format.
What does this component exatly do it that case?
Does it determine itself the input encoding format ?
Currently, if I try to convert an ANSI text file to UTF-8 using this component, all accentuated caracters are currupted.

rgds
JL Lecardinal
Moderator

Re: tChangeFileEncoding

Hi,
If you use the tChangeFileEncoding component without specifying the input encoding format, it will get your system encoding by default.
java.io.BufferedReader in_tChangeFileEncoding_1 = new java.io.BufferedReader(
new java.io.InputStreamReader(
new java.io.FileInputStream(
sOriFileN_tChangeFileEncoding_1),
System.getProperty("file.encoding")));

I have make a test for converting an ANSI text file to UTF-8 using this component, but there is an exception popped up.
Exception in component tChangeFileEncoding_1
java.io.UnsupportedEncodingException: ANSI
at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at demo.changefileencoding_0_1.ChangeFileEncoding.tChangeFileEncoding_1Process(ChangeFileEncoding.java:294)
at demo.changefileencoding_0_1.ChangeFileEncoding.runJobInTOS(ChangeFileEncoding.java:520)
at demo.changefileencoding_0_1.ChangeFileEncoding.main(ChangeFileEncoding.java:388)
connecting to socket on port 3515
connected
disconnected
Job ChangeFileEncoding ended at 12:28 11/12/2012.

I doubt that we cannot support this Encoding.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seventeen Stars

Re: tChangeFileEncoding

It is called ASCII not ANSI.
Moderator

Re: tChangeFileEncoding

Hi,
It is called ASCII not ANSI.

@jlolling, you are so great! If it is ASCII, we can support that. I also wonder what is "ANSI"....
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog