I have a bunch of strings with different charsets. The $charset
variable contains the charset of the current string.
$content = iconv($charset, 'UTF-8', $content);
With this done, is it safe to use strpos
, strlen
, substr
etcetera and not their multibyte equivalent? I'm asking this because I use preg_match
a lot as well. So if I use PREG_OFFSET_CAPTURE
to get the position of a word in the string I can't use that value with mb_substr
to remove everything before the word.