Broken @WordCount for Arabic
-
WordCount Calculation for Non-Latin / Multibyte Languages (e.g., Arabic)
Data::collect() uses PHP’s built-in str_word_count(), which is not Unicode-aware and fails when processing non-Latin scripts (e.g., it reports only 44 words instead of ~997 words for a 9,926-character Arabic post).
Suggested Fix:
Replace str_word_count() with a robust regex pattern or mb_ functions that support Unicode properties (\p{L} / \p{N}):Happy to test a beta build or provide further context if needed.
Best regards
You must be logged in to reply to this topic.