Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper functions to convert ASCII bytes to EBCDIC and vice versa #6892

Closed
MohamedSabthar opened this issue Aug 20, 2024 · 0 comments · Fixed by ballerina-platform/module-ballerinax-copybook#40

Comments

@MohamedSabthar
Copy link
Member

Description:
Add following helper methods to convert ASCII bytes to EBCDIC bytes and vice versa in copybook module

# Converts a byte array encoded in EBCDIC to a byte array encoded in ASCII.
#
# + ebcdic - The input byte array encoded in EBCDIC
# + return - The output byte array encoded in ASCII
public function toAsciiBytes(byte[] ebcdic) returns byte[] {
    // ...
}
# Converts a byte array encoded in ASCII to a byte array encoded in EBCDIC.
#
# + ascii - The input byte array encoded in ASCII
# + return - The output byte array encoded in EBCDIC
public function toEbcdicBytes(byte[] ascii) returns byte[] {
    // ...
}

Describe your problem(s)

Describe your solution(s)

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
1 participant