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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rid_rj
Contributor III
Contributor III

problem special characters

Hello,

i have a problem in display of XML File, problem of special characters.

when i open the file with a editor xml, i got like two points :

 

 0683p000009LsrQ.jpg

and when i open the file with mozilla firefox, i got a special character :

0683p000009LtAM.jpg

 

And when i use tlogRow to display data in talend, i got empty space:

0683p000009Lt8L.jpg

 

I didn't understand this display difference and why in the mozilla firefox, i got this special caractere, it's not good when i display data in web (i want to remove this special caractere in mozilla)

I tried to use tReplace to remove the two point (..) / (¨) but i got nothing, i got the same result.

 

Thanks

Reda

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

You can try to remove all non-ascii char from your string:

row1.fieldName.replaceAll("[^\x0A\x0D\x20-\x7E]", "")

(not tested)

 

View solution in original post

9 Replies
TRF
Champion II
Champion II

Hi,

Are you usin tFileInputXML component?

If so, try to define Encoding as UTF-8 on Advanced Setting tab.

rid_rj
Contributor III
Contributor III
Author

 I use tAdvancedFileOutoutXML and i tried to use all encoding but the always i got the same result

TRF
Champion II
Champion II

OK but what about your input ?

rid_rj
Contributor III
Contributor III
Author

My input is a Data from database, i give you three display by using tAdvancedfileoutputXML (fireffox and XMLCopy Editor) and tLogrow.

When i execute the my requete sql in hybris i got like this ( big point )

0683p000009Lro7.jpg

TRF
Champion II
Champion II

It seems the special character is in your input.

Try to display ascii code for each character, this will give you the answer for "which character must be removed to clean the output".

rid_rj
Contributor III
Contributor III
Author

The code ascii is 149,  it correspond à "ò", i use treplace but always without success.

0683p000009LsvP.jpg

TRF
Champion II
Champion II

You can try to remove all non-ascii char from your string:

row1.fieldName.replaceAll("[^\x0A\x0D\x20-\x7E]", "")

(not tested)

 

rid_rj
Contributor III
Contributor III
Author

Yes, Thanks TRF, just i used this code:

replaceAll("[^\\x00-\\x7F]", "");
 
 
 
TRF
Champion II
Champion II

Great!

Thank's to mark your case as solved.