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 some extra coverage to the IBM037 encoding to extend ASCII compatibility when in FRB_COMPATIBILITY_MODE #386

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

Hillrunner2008
Copy link
Contributor

When FRB_COMPATIBILITY_MODE is enabled, converts IBM037 byte values to their
IBM1047 equivalents before decoding:

  • 0xAD (Ý) -> 0xBA ([)
  • 0xBD (¨) -> 0xBB (])
  • 0x5F (¬) -> 0xB0 (^)

The reason is FRB will passtrhough content from any ICL received and occasionally a variant encoding is used. As there are only 3 differences I have found within the ascii range this patch is very targetted and specific to where they have been seen in the wild but could be implemented elsewhere in the future if needed. If it becomes common enough, the support could be added to the default EBCDIC encode/decoder in reader.go

Add support for IBM1047 EBCDIC encoding compatibility with IBM037 for the
three ASCII characters that differ between the encodings: [ ] ^

When FRB_COMPATIBILITY_MODE is enabled, converts IBM037 byte values to their
IBM1047 equivalents before decoding:
- 0xAD (Ý) -> 0xBA ([)
- 0xBD (¨) -> 0xBB (])
- 0x5F (¬) -> 0xB0 (^)
Copy link
Collaborator

@atonks2 atonks2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@atonks2 atonks2 merged commit 6da2ad9 into moov-io:master Dec 4, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants