1

I'm happy to use all the multibyte string functions in my app, but when using external libraries it would a pain to find and replace them all.

Given I can control external input so that only UTF-8 data will be present, issues that arise from comparing two different encoding types won't be a problem (i.e. str_replace is fine as is).

So which string functions do I need to replace with the mb_* equivalent?

So far I'm sure I need to replace

  • strpos()
  • strlen()
  • substr()

Are there any others?

Alternatively, is using overloading a viable option, or is this likely to cause issues?

user37315
  • 13
  • 3

0 Answers0