One Star

Problem with ñ removeAccents function

HI
I am using Talend 5.0 and am having a problem with TalendString.removeAccents function.
I have a very large jobs that read from a delimited file and do a final filterRow where in one of the conditions removeAccents use.
Use removeAccents because I have to see if it meets a field that I get in uppercase and without accent.
condition I write
input_row.NOMBRE_DECLARANTE.equals(TalendString.removeAccents(input_row.NOMBRE_DECLARANTE).toUpperCase())

The problem I have is that when you get ñ a word that has ñ does what I expect after the filter and if I remove the rejected rows shows me error message as advanced condition failed
If I put "N". Equals (TalendString.removeAccents ("N"). ToUpperCase ())
does what I expect.

The codifiicación you use in file is:
format: unix
encoding: ISO-8859-1
Regards,
Oscar Manso
7 REPLIES
One Star

Re: Problem with ñ removeAccents function

Hi Oscar
"advanced condition failed" means the two columns of this row don't match the condition.
Why is this a problem?
I have reproduced this job.
And my test data is as follow.
ñ;N
ñ;n

The second row will be filtered and show as a rejected row correctly.
The error message is just a column.
Regards,
Pedro
One Star

Re: Problem with ñ removeAccents function

Hi
The problem is that if the text is SPAIN and compare it with the same text removed and passed to uppercase accents gives me the row to be rejected when it should say that is not rejected.
I think this is because the coding that I have put in the file.
I can tell you something.
Regards,
Oscar Manso
One Star

Re: Problem with ñ removeAccents function

Hi
Yes, I think this is related to the coding in the file.
Because i test it in other coding, result is right as above.
Regards,
Pedro
One Star

Re: Problem with ñ removeAccents function

Hi
What encoding should I use to do me right
Regards,
Oscar Manso
One Star

Re: Problem with ñ removeAccents function

Hi
Try UTF-8?
Regards,
Pedro
One Star

Re: Problem with ñ removeAccents function

Hi
Already tested but no swallows Ñ as other characters
Regards,
Oscar Manso
One Star

Re: Problem with ñ removeAccents function

Hi
Me contesta alguien

Un saludo,
Oscar Manso