Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


Some UTF file encodings have a special "BOM" sequence of characters (Byte Order Mark).

Example when viewing an UTF-8 with BOM file within an ISO-8859-1 editor:

John;Doe
Jane;Jackson

 

When reading such files, these first characters may be considered as part of the data.

In order to ignore them, a simple trick in Stambia is to add a transformation script to the File metadata, such as:

i=0;
j=0;
do
{
    i=__in__.read();
    j=j+1;
    /* return data only after third character */
    if(j>3)
    {
         if (i>-1)
         {
             ch=String.fromCharCode(i);
             i=ch.charCodeAt();
             __out__.write(i);
         }
    }    
}while(i>-1);

 

 

Articles

Suggest a new Article!