0

How do I remove trailing, leading and multiple spaces between the Arabic words. The spaces in Arabic fields are not like the space which we have in English language. In Arabic spaces will be some elongated characters different from the blank space characters that we use in English. Please suggest me a way to validate the Arabic fields and remove extra spaces form the fields in Informatica Developer perspective.

Thanks Shaikh

Mukhtar .
  • 11
  • 2

2 Answers2

0

Use a java transformation and split your string containing the arabic spacing on said arabic spaces:

String[] myArray = myString.split(" ");//in between quotes replace the space with Arabic space

Then iterate over the array concatenating all of the strings in the array

String cleanString = new String;
cleanString = ""; //create an empty string
for(String str : myArray){
    if(str.equals(" ")) //again replace the space with whatever 
        continue; //skip it if it's a space

    cleanString += str;//concatonate any string that isnt a space
}
CyberStems
  • 326
  • 2
  • 15
0

Check the character code and use REPLACECHR with a CHR function, like

REPLACECHR(0, input_Port_Name, CHR(<the_space_character_code>), '')
Maciejg
  • 3,088
  • 1
  • 17
  • 30