Skip to content

Fix final sigma handling in :greek - #15791

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
AlexGx:ag-greek_final_sigma-fix
Aug 24, 2026
Merged

Fix final sigma handling in :greek#15791
josevalim merged 1 commit into
elixir-lang:mainfrom
AlexGx:ag-greek_final_sigma-fix

Conversation

@AlexGx

@AlexGx AlexGx commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Final sigma casing is incorrect in several common cases

Current implementation checks already lowercased output acc instead of the original input context

iex> String.downcase("AΣ", :greek)
"aσ" # expected "aς"

ex> String.capitalize("ΑΣ", :greek)
"Ασ" # expected "Ας"

Final sigma applied when:

  • has preceding cased character, ignoring case-ignorable characters
  • does not have a following cased character, again ignoring case-ignorable characters

Cases covered:

  • cased characters from Latin and Greek scripts
  • case-ignorable punctuation and combining characters
  • Other_Lowercase / Other_Uppercase Unicode props
  • expanded lowercase mappings such as İ
  • capitalization after cased / uncased prefixes ("AΣ" → "Aς", "1Σ" → "1σ")

(Reviewed) Assisted-by: GPT-5.6 Sol

@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@josevalim
josevalim merged commit 093d4c8 into elixir-lang:main Aug 24, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants