Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Labels (2)
3 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

It is called ASCII not ANSI.
Anonymous
Not applicable
Author

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