Closed DimuthuMadushan closed 2 months ago
With this support we need to add the following API in copybook:Converter
class
public enum Encoding {
ASCII,
EBCDIC
}
private isolated function toBytes(typedesc<record {}> t, string? targetRecordName = (),
Encoding encoding = ASCII) returns byte[]|Error {
// ...
}
private isolated function fromBytes(byte[] bytes, string? targetRecordName = (),
Encoding encoding = ASCII, typedesc<record {}> t = <>) returns t|Error {
// ...
}
based on the encoding functions mentioned here can be called internally to handle the conversion: https://github.com/ballerina-platform/ballerina-library/issues/6892
Description:
The BINARY fields use a different encoding mechanism compared to the standard fields. The following resource that explains the encoding steps. http://www.simotime.com/databn01.htm