ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

Add support to put and get EBCDIC encoded byte[] as payload in IBM MQ connector #6920

Open MohamedSabthar opened 2 months ago

MohamedSabthar commented 2 months ago

Description: Consider the following scenario of sending a byte[] encoded in EBCDIC:

ibmmq:Queue queue = ...
byte[] bytes = [195, 201, 200]; // "CIH"
check queue->put({payload: bytes});
var msg = check queue->get();
io:println(msg !is () ? msg.payload : ""); // [195,131,195,137,195,136]

The resulting payload prints a different value (i.e., [195,131,195,137,195,136]) compared to what was sent to the queue (i.e., [195, 201, 200]). This discrepancy may be due to the connector only handling ASCII encoding. There is a requirement to support EBCDIC or custom encoding.

Describe your problem(s)

Describe your solution(s)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):