im trying to count the number of words in variable written in non-latin language (Bulgarian). But it seems that str_word_count() is not counting non-latin words. The encodin
As it stated in str_word_count description
str_word_count
'word' is defined as a locale dependent string
Specify Bulgarian locale before calling str_word_count
setlocale(LC_ALL, 'bg_BG'); echo str_word_count($content);
Read more about setlocale here.
setlocale