Encoding determination
Sometimes you may be dissatisfied by automatic encoding determination. In such cases you can load and save json file with defined encoding. Example:
[
{
"partners": [],
"fileType": "EDIFACT",
"payloadMatchingExpression": "^.*?UNB\\+(UNOA|UNOB|UNOC):",
"encoding": "ISO-8859-1"
},
{
"partners": [],
"fileType": "EDIFACT",
"payloadMatchingExpression": "^.*?UNB\\+UNOD:",
"encoding": "ISO-8859-2"
},
{
"partners": [],
"fileType": "X12",
"encoding": "IBM437"
},
{
"partners": [],
"fileType": "TRADACOMS",
"encoding": "ISO-8859-1"
},
{
"partners": [],
"fileType": "EDIFACT",
"encoding": "ISO-8859-1"
},
{
"partners": [
"PARTNER1",
"PARTNER2",
"PARTNER3"
],
"fileType": "EDIFACT",
"encoding": "GB2312"
},
{
"messages": [],
"fileType": "XML",
"encoding": "ISO-8859-3"
}
]
The configuration should satisfy the conditions:
-
Either
fileType,partners, ormessagesmust be set. -
Configuration with
partnershas the highest priority and overrides any configuration withmessagesand/orfileType. -
Configuration with
messageshas higher priority than configurations withfileTypeand overrides such configurations. -
payloadMatchingExpression(it’s regex) is optional, it just means that in addition to config lookup it should check if payload matches (partially - it means that at least one matched part found) specified regex. -
If many configs were found during lookup, the first matching config is used.
-
UTF-8s always used for parsing whenpayloadMatchingExpressionis defined.
To download configured encoding determination rules click on
.