Add __UNTAGGED_FILE_ENCODING environment variable#102
Draft
IgorTodorovskiIBM wants to merge 1 commit into
Draft
Conversation
Summary: - Add __UNTAGGED_FILE_ENCODING variable for encoding-first untagged file handling - Support semantic tokens: DETECT, IGNORE, WARN - Support numeric CCSIDs (e.g., 1047, 819, 1208) - Support encoding names via z/OS __toCcsid() (e.g., UTF-8, IBM-1047, ASCII) - New variable takes precedence over legacy __UNTAGGED_READ_MODE - Fully backwards compatible with existing __UNTAGGED_READ_MODE behavior Implementation: - Parser integrated into src/zos.cc (internal, no new library needed) - Added __get_untagged_file_ccsid() getter for CCSID retrieval - Updated __file_needs_conversion_init() to use explicit CCSID when specified - Comprehensive man page documentation with examples Testing: - Integration tests verify parsing, precedence, and behavior mapping - Tests confirm backwards compatibility with legacy variable Limitations: - Current conversion infrastructure supports EBCDIC (1047) ↔ ASCII (819) - Other CCSIDs parsed correctly but conversion limited until iconv() integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am added a new environment variable because the existing __UNTAGGED_READ_MODE is confusing to customers. We will use __UNTAGGED_FILE_ENCODING
Summary:
Implementation:
Testing:
Limitations: