Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Moe1
Contributor II
Contributor II

ANSI

Hi,

 

Im trying to convert utf8 file to ANSI, I used the advanced tab (windows-1252, and ISO-8859-1) both resulted in ?????. Also I used tChangeFileEncoding .. same result.

 

 

Labels (2)
7 Replies
Anonymous
Not applicable

Hi,

 

   Could you please try the second approach mentioned in the form?

 

   You can dd them to a routine or tJavarow based on your uase case.

 

https://stackoverflow.com/questions/45583702/converting-string-from-utf-8-to-ansi-and-displaying-it-...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Moe1
Contributor II
Contributor II
Author

Thank you but it did not work 0683p000009MPcz.png

Anonymous
Not applicable

Hi,

 

    What is the error you are getting? Could you please share some sample input records and expected output for those input records?

 

    It will give some idea for us about your use case and we will get something to test.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Moe1
Contributor II
Contributor II
Author

Thank you, here is an example:

By applying this transformation, the value “Micheal ESKANDAR-CHR/متابعة” should be stored in the text file as: “Micheal ESKANDAR-CHR/ãÊÇÈÚÉ”...

To be noted that we have a code in vb (macro) that do the job but we are dumping it and using Java through ETL process, here is the current function header in vb:

 

Call UTFToANSI(fileDir + "\" + Filename + ".unicode.txt", "utf-16", fileDir + "\" + Filename + ".txt", "Windows-1256").

 

To be noted I tried these combinations, utf8, iso-8859-15, cp1252, cp1256 without any success.

Anonymous
Not applicable

Hi,

 

   When I tried ISO-8859-1 as target encoding, I got below details as output.

 

0683p000009M2wA.png

 

The function I used with tJavarow is as below.

 

 

output_row.output = new String(input_row.data.getBytes("UTF-8"), "ISO-8859-1");

 

 

I was referring below link for conversion. I couldn't check it much as I have to go for a meeting now.

 

https://stackoverflow.com/questions/652161/how-do-i-convert-between-iso-8859-1-and-utf-8-in-java

 

Hopefully the link will help you.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

 

 

 

Moe1
Contributor II
Contributor II
Author

the result should be like this:
“Micheal ESKANDAR-CHR/ãÊÇÈÚÉ”
Moe1
Contributor II
Contributor II
Author

I managed to get this output:
"Micheal ESKANDAR-CHR/ãÊÇÈÚÉ"
using iso-8859-15 however if you checked the encoding in notepad or notepad++ it shows it is UTF8 or UTF8 with BOM and not ANSI .. This resulting in an incorrect file encoding error eventhough the characters inside are the desired ones...

Any Talend GURU could help, thanks.