services Create file in UTF8 without BOM encoding

Hi,

I had a requirement in which i am convrting the UTF-BOM bytes to string and from the string I need to convert or remove the UTF-BOM to UTF8. Could any one can help me in writing the java service or paste the code.

And I used the ignoreBOMChars to true while converting bytesToString but still it is not removing the BOM chars in the string

Thanks
Raj

There are services in WmPublic that fits your requirements. Look for string and utils folder. Refer built-in services guide.

Also review my comments at http://tech.forums.softwareag.com/techjforum/posts/list/55225.page

Hello Mahesh,

Thanks for the reply the link says it converts to UTF-8-BOM,But my requirement is to remove BOM chars and make it as UTF-8.

And coming to inbuilt service bytesToString it is not working when i made removeBomChars To true.

Thanks
Raj

We might have to write a similar service that does your job.

Most importantly if you are sure that OOTB services are not working as expected raise a incident against SAG to get further consultation.

Meanwhile pass on your working sample package with inputs and expected outputs. I can have a look at it.

Hi,

Attahed the sample file and the package to test the file length should come as 0 after removing the BOM chars.Could you please check and help in creating the custom service to remove the BOM chars and get the output length as 0 as it is an encrypted file pgp

Thanks
Raj
ACTION.csv.zip (686 Bytes)
Samplepkg.zip (5.38 KB)