Skip to content

ICU-23513 ICU4J: fix PDI overrides and BD16 bracket-stack overflow - #4193

Draft
roozbehp wants to merge 1 commit into
unicode-org:mainfrom
roozbehp:roozbehp-bidi-java
Draft

roozbehp wants to merge 1 commit into
unicode-org:mainfrom
roozbehp:roozbehp-bidi-java

Conversation

@roozbehp

@roozbehp roozbehp commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

J1: Apply the active directional override to PDI as required by X6a,
while retaining its isolate identity for X10 and whitespace treatment for L1.

J2: Enforce BD16's limit of 63 pending opening brackets. On overflow,
discard all pairs in that isolating run sequence, including earlier pairs.
Track BD16 separately from ICU's N0 state; reprocess only when overflow
requires undoing earlier bracket resolutions.

Add regression tests for both issues, including matched/unmatched PDIs,
L1 line endings, the 63/64 boundary, canonical bracket equivalents,
isolating run sequence boundaries, contextual paragraphs and streaming.

Checklist

  • Required: Issue filed: ICU-23513
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@roozbehp

Copy link
Copy Markdown
Contributor Author

@markusicu, the fixes are not trivial, and would look like this. I can go ahead and create another pull request for the C bidi implementation, but you definitely need an owner on the ICU side to review and own this. It can't be me.

@roozbehp roozbehp changed the title ICU-23513 ICU4J bidi fixes ICU-23513 ICU4J: fix PDI overrides and BD16 bracket-stack overflow Sep 16, 2026
@roozbehp
roozbehp marked this pull request as draft September 17, 2026 23:53
@roozbehp

Copy link
Copy Markdown
Contributor Author

Converting to draft in favor of smaller more-reviewable changes.

@roozbehp

Copy link
Copy Markdown
Contributor Author

Fix for the easier case at #4205

This branch has not been deployed

No deployments
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