User tests: Successful: Unsuccessful:
Fix: use UTF-8 safe substr for multibyte support in mod_articles_category
Fixes #45452
Replaced the regular substr() function with mb_substr() in mod_articles_category to ensure correct multibyte string handling for UTF-8 encoded text.
Multibyte characters were sometimes cut off or displayed incorrectly.
Multibyte characters are displayed correctly and not truncated.
| Status | New | ⇒ | Pending |
| Category | ⇒ | Modules Front End |
@Suyash2JZ Please fix the code style errors, see my previous review suggestions. Thanks in advance.
Update 2025-11-02: I've allowed myself to apply the necessary code style fixes.
| Title |
|
||||||
| Labels |
Added:
bug
PR-5.4-dev
|
||
The code looks OK but I could not figure out how to trigger before/after observations. I tried altering the date filtering options in the module. So testing needs someone with more insight or more specific testing instructions.
I couldn't figure out how to compare before and after. Looking at the description, it's about multibyte support, but the changes in the code only affect lines that deal with a date field. Okay, the addition in these lines certainly makes sense, but I can't understand where multibyte characters should be cut off incorrectly.
Like the previous fellow campaigner, someone with more experience in this area is definitely needed here. A more detailed description of the testing instructions would be helpful.
I have tested this item 🔴 unsuccessfully on b4aa1cc
Multibyte characters were displayed correctly and not truncated even before applying the PR
I have tested this item ✅ successfully on b4aa1cc
Wrong raporting - please delete !
@Suyash2JZ From reading the issue, which shows a problem with Chinese UTF-8 character cutting in the intro field, I do not understand how UTF-8 safe substr for multibyte support in month/year field could solve the issue?
The code in this PR is completely unrelated to the reported problem
@Suyash2JZ I recommend closing this PR yourself. If we don't hear back from you, we'll close it in one week. You're of course welcome to reopen it or submit a new PR if you want to continue working on it.
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-08-25 05:57:19 |
| Closed_By | ⇒ | muhme | |
| Labels |
Added:
Updates Requested
|
||
please re-open the original issue that was closed because of this PR but that this PR didnt actually address
re-opened
This pull request has been automatically rebased to 5.4-dev.