Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
=========================================
Coverage 99.45% 99.46%
- Complexity 155 157 +2
=========================================
Files 23 25 +2
Lines 368 372 +4
=========================================
+ Hits 366 370 +4
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3cee62b to
87f9241
Compare
The new UppercaseFormatter provides reliable UTF-8 aware uppercase conversion for international text, ensuring accented characters and non-Latin scripts are handled correctly using mb_strtoupper(). This formatter is essential for applications requiring proper internationalization support when manipulating text in various languages like French, German, Turkish, Greek, Cyrillic, and CJK languages. Includes comprehensive tests covering ASCII, Latin accents, non-Latin scripts, emoji, combining diacritics, right-to-left text, multi-byte characters, and mixed content scenarios. Assisted-by: OpenCode (GLM-4.7)
The new LowercaseFormatter provides reliable UTF-8 aware lowercase conversion for international text, ensuring accented characters and Turkish special cases (İ/i) are handled correctly using mb_strtolower(). This formatter complements UppercaseFormatter and is essential for applications requiring proper internationalization support when manipulating text in various languages including those with special character mapping rules. Includes comprehensive tests covering ASCII, Latin accents, Turkish characters, non-Latin scripts, emoji, combining diacritics, right-to-left text, multi-byte characters, and mixed content. Assisted-by: OpenCode (GLM-4.7)
87f9241 to
d6d59d5
Compare
alganet
requested changes
Feb 6, 2026
Comment on lines
+253
to
+261
| public static function providerForMultiByte(): array | ||
| { | ||
| return [ | ||
| 'chinese' => ['你好世界', '你好世界'], | ||
| 'japanese katakana' => ['コンニチハ', 'コンニチハ'], | ||
| 'korean hangul' => ['안녕하세요', '안녕하세요'], | ||
| 'cjk characters' => ['简体字繁體字漢字', '简体字繁體字漢字'], | ||
| ]; | ||
| } |
Member
There was a problem hiding this comment.
I'm not sure these examples are testing anything. For case conversion, we need to target a script that has different uppercase/lowercase characters.
The cyrilic example is good. Also, portuguese Ç -> ç, Á -> á. I think greek is also a good multibyte example.
At best, this provider should be renamed providerNoCase or something like that. It's important to test that languages that don't have the concept of upper/lower case remain the same.
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.
No description provided.