cancel
Showing results for 
Search instead for 
Did you mean: 

handle PI sender binary text

former_member186158
Active Participant
0 Kudos

Customer send text file by AS2, but PI can't parse Chinese characters.

I wrote some Java code, find out the text file is GB2312.

I have tried very hard to parse the text file with modules, but failed

AF_Modules/TextCodepageConversionBean

AF_Modules/MessageTransformBean


I convert the file to UTF-8 and PI can parse it.

But the customer don't want to use UTF-8 format.

Do I have to write a module?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member186158
Active Participant
0 Kudos

add localejbs/AF_Modules/TextCodepageConversionBean, no luck.

stefan_grube
Active Contributor
0 Kudos

Use MessageTransformBean twice. In first occurance of MTB, set parameter Transform.ContentType = text/plain;charset="GB2312" In second occurance (where you do your text2xml conversion) set Transform.ContentType = text/plain;charset="UTF-8"

former_member186158
Active Participant
0 Kudos

It works!

Thanks very much.

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

Internally, SAP PI always use UTF-8, so your customer has to accept this. After processing the file, you can transform it back to GB2312 or any other useful codepage.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Shen,

                You need a java mapping or adapter module to convert it to a format so that it can be further used in message mapping. In case you are going for java mapping do not use an FCC, use dummy SI.

Regards

Anupam

former_member186851
Active Contributor
0 Kudos

Hello Shen,

Try this encoding-GB18030 in the module beans

Harish
Active Contributor
0 Kudos