-
Notifications
You must be signed in to change notification settings - Fork 124
Bidi CCSID Support via Extension Settings #2826
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
base: master
Are you sure you want to change the base?
Conversation
- Added two new extension settings(index.ts): 1. Enable Bidi conversion 2. Target CCSID for Bidi conversion - Modified IBMiContent to apply Bidi-aware conversion logic when enabled via user settings, including fallback and error handling.
Extends the Bidi handling to also apply when uploading source members back to the IBM i.
…urce Dates are enabled
|
@yuvalnn This is look like a good start, but we're going to need some granular tests in |
- Added BiDi test cases in src/api/tests/suites/encoding.test.ts - Covers Hebrew (CCSID 424) and Arabic (CCSID 420) - Includes helper convertToUTF8WithCCSID and edge cases
|
@worksofliam I’ve added a new synchronous test suite in encoding.test.ts to cover the BiDi changes, thanks to the work from @Itsanexpriment The suite includes: We kept this in a separate suite to avoid interfering with existing async tests. |
|
Hi @sebjulliand , could you please review this PR? |
|
Hi @yuvalnn , I finally have time to look at this, sorry about the delay. Something like: if target source file's CCSID is 420 or 424, then convert using the special Bidi method. What do you think? |
|
Hi @sebjulliand, thanks for the review. I'll make the change and update. |
|
Hi @sebjulliand after further checking there are situations where automation is not enough.
By the way, other IBM open-source projects, like JTOpen, follow the same approach: the user explicitly enables Bidi and chooses the algorithm (similar to CCSID). |
* Convert to Utf8 with bidi compatible ccsid * Convert from Utf8 to bidi ccsid when uploading member with source dates
Changes
This PR adds configurable Bidi (bi-directional text) support for source members encoded in CCSIDs like 424, 420, and others.
Features
New extension settings under "Source Code":
Enable Bidi support for member editing(checkbox).Bidi-compatible CCSID(number input).Conversion logic only runs when enabled in the settings.
Encoding is handled via IFS-based copy to avoid corruption.
The implementation is cleanly isolated to avoid side effects.
How to test this PR
Enable Bidi support for member editing.Bidi-compatible CCSID.Checklist
console.logs I added