Check this snippet:
mb_internal_encoding("UTF-8");
mb_regex_encoding("UTF-8");
mb_ereg_search_init('καλημέραCCC', 'C+');
$pos = mb_ereg_search_pos();
echo $pos[0];
(Please don't comment on this specific example, it's not my use case, it's a reduction of the problem I'm having)
Even though the string "καλημέρα" consists of 8 characters, the snippet above prints 16. Am I missing something? Isn't mb_ereg_search_init supposed to support multi-byte? And if I am, is there any built-in function that does what I need?
Thanks in advance.