How to make TN pick the right encoding for EDIFACT data?

Hello,

I am confronted with a question whether webMethods TN can take the encoding/charset mentioned in the EDI file or not. The EDIFACT standards have specific field in the EDI data in the UNB segement for the charset to be used. (Link - [URL]https://sandroaspbiztalkblog.wordpress.com/2009/08/15/edifact-encoding-edi-character-set-support/[/URL]). But the wm.tn.doc:recognize service is either taking UTF-8 or a default encoding set in the properties.cnf file of WmEDI package.

SAG is suggesting to create multiple gateway services with different encodings hardcoded for the recognize service. Obviously this solution is so dumb.

Why is TN not picking the encoding mentioned in the EDI file according to the EDI standards? Any configurations missing on the system side?

Environment: 6.5

Cheers
Guna

Finally I had to do it my own way.
When the EDIFACT is received, parse the EDIFACT against the EDIFACT envelope schema and get the UNB1 segment value (UNOA, UNOB…UNOY). The corresponding encodings are stored in the package config file. Once the encoding is retrieved, do convertToValues (pass the EDIFACT enevlope schama and encoding) → recordToBizdoc (pass the encoding) → set some attributes (process related) → persist → getRule → route.

The test is done against this encodings chart (Encoding Charts) and it is working fine, not just for envelope but also for the individual transactions :slight_smile:

Cheers
Guna