[resolved] Space like Character not converted by UTF-8 to ISO-8859

One Star

[resolved] Space like Character not converted by UTF-8 to ISO-8859

I have managed to convert my files from UTF-8 to ISO-8859, but I have discovered a character of 160 between the name and surname of all the names.
I tried to use Ereplace with Char(160) but it complained saying it was a not a string.
Whats the best way to replace non-printable Asciis in strings as I should really do this across all rows.

Accepted Solutions
Seventeen Stars

Re: [resolved] Space like Character not converted by UTF-8 to ISO-8859

Sorry thats what you told me.
The method is still the same but with a different parameter:
This is the syntax of the unicode replacement in Java:
(\u)(u)*(HexDigit)(HexDigit)(HexDigit)(HexDigit)

For your case:
row2.Player.replace('\u00A0', ' ').replace('\uC2A0', ' ')

I am not fully sure about the byte order so you should try it - best way in a small test java project.

All Replies
Seventeen Stars

Re: [resolved] Space like Character not converted by UTF-8 to ISO-8859

you can use the replace method of the String class.
Use this expression in the tMap
row1.name.replace('\u0160', ' ')
One Star

Re: [resolved] Space like Character not converted by UTF-8 to ISO-8859

Unfortunately it didnt work.
I thought I had better explain this better.I have put all the data in hex format to show the issues more clearly
I start off with a UTF-8 file which contains c2 a0

I run the UTF-8 to ISO-8859 conversion in Talend and it gives me this

i.e just leaving me a0
So I then tried this
row2.Player.replace('\u0160', ' ') 
But the output file still shows this

Seventeen Stars

Re: [resolved] Space like Character not converted by UTF-8 to ISO-8859

Sorry thats what you told me.
The method is still the same but with a different parameter:
This is the syntax of the unicode replacement in Java:
(\u)(u)*(HexDigit)(HexDigit)(HexDigit)(HexDigit)

For your case:
row2.Player.replace('\u00A0', ' ').replace('\uC2A0', ' ')

I am not fully sure about the byte order so you should try it - best way in a small test java project.
One Star

Re: [resolved] Space like Character not converted by UTF-8 to ISO-8859

Wunderbar! Mit row2.Player.replace('\u00A0', ' ') es hat geklappt! Vielen dank