Skip to content

Add Kurdish letter lam with small v to the Kurdish table - #104

Merged
mpcabd merged 2 commits into
mpcabd:masterfrom
anqorithm:fix/kurdish-lam-small-v
Nov 2, 2026
Merged

mpcabd merged 2 commits into
mpcabd:masterfrom
anqorithm:fix/kurdish-lam-small-v

Conversation

@anqorithm

Copy link
Copy Markdown
Contributor

Fixes #67

ڵ (U+06B5) was missing from LETTERS_KURDISH, so Kurdish text left it unshaped. This adds it with the mapping from the issue, which the reporter said worked for them.

Please check the mapping: Unicode has no presentation forms for this letter, so the initial, medial and final forms use private-use code points (U+E008, U+E009, U+E007), like the other Kurdish-specific letters in the table. These depend on the font, and I couldn't check them against Sarchia or another Kurdish font, so I can't confirm the right glyphs appear on screen.

Testing: added a test covering all four forms, which fails without this change. All tests in arabic_reshaper/tests pass. Only the Kurdish table changed.

U+06B5 was missing, so it stayed unshaped in Kurdish text.

Signed-off-by: anqorithm <61029571+anqorithm@users.noreply.github.com>
@mpcabd

mpcabd commented Nov 2, 2026

Copy link
Copy Markdown
Owner

@claude take a look at this, review, check tests, confirm everything is in order.

@claude

claude Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Claude finished @mpcabd's task in 24s —— View job


Review of PR #104

The change looks correct from reading it. I could not run the tests, because my environment denied approval for pytest and unittest. Please confirm CI is green.

  • Read the diff
  • Check the table entry against the other Kurdish entries
  • Check the test file
  • Run the test suite (blocked, see below)

arabic_reshaper/letters.py:472

  • The new entry is 'ڵ': ('ڵ', '', '', ''). It sits in LETTERS_KURDISH in code point order, between U+06B3 and U+06BA.
  • The tuple order is (isolated, initial, medial, final). Initial is E008, medial is E009 and final is E007, which matches the PR description.
  • E007–E009 are not used anywhere else in the file. The existing Kurdish letters use E000–E006, so the numbering continues without collisions.
  • Only the Kurdish table changed, so other languages are unaffected.

arabic_reshaper/tests/test_005_kurdish.py

  • The test covers the isolated, initial, medial and final forms.
  • I checked the bytes of the test literals. The initial case expects EE 80 88 (U+E008) and the medial case expects EE 80 89 (U+E009). Both match the table.
  • The file uses subTest and is picked up by the existing test_00N_*.py pattern.

Suggestions (minor)

  1. The test strings contain invisible private-use characters, so the expected values look empty in the diff and in most editors. Writing them as escapes ('ڵم', '') would make the test readable and keep it from breaking if an editor strips those characters.
  2. assertIn only checks that the expected character appears somewhere in the output. An assertEqual on the whole output would also catch a neighbouring letter being shaped wrongly. For example, reshape('ڵم') should equal '' + <final meem>.
  3. A full-word case would round out the test. It could cover ڵ next to a non-joining letter, or a Kurdish word that appears in the issue.

Open question (needs the maintainer)

  • As the PR says, the private-use glyphs E007–E009 depend on the font. Nobody has checked them against Sarchia or another Kurdish font. The reporter in Letter ڵ is not reshaped #67 said the mapping worked for them, and that is the only evidence so far. Please confirm this is acceptable, or check the glyphs in a font you trust before merging.

Verdict: The code and tests look right. Nothing is blocking apart from the font verification above. I did not make any changes.

- Write the private-use code points as escapes so the expected values
  are visible in diffs and editors.
- Compare the whole reshaped output with assertEqual instead of
  assertIn, so a wrongly shaped neighbour or extra output also fails.
- Add real Kurdish words that put the letter after a non-joining letter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mpcabd
mpcabd merged commit c43fbda into mpcabd:master Nov 2, 2026
5 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.

Letter ڵ is not reshaped

2 participants