4

Where can I get a complete list of all multi-byte functions for PHP? I need to go through my application and switch the non MB string functions to the new mb functions.

Kladskull
  • 10,332
  • 20
  • 69
  • 111
  • do I need to bother doing this? What would the consequnces bt for me to leave my DB utf-8 and not use the mb_string stuff? – Kladskull Jun 23 '09 at 03:37

3 Answers3

2

And for the "and switch the non MB string functions to the new mb functions" part of the question: You might be interested in http://php.net/mbstring.overload:

mbstring supports a 'function overloading' feature which enables you to add multibyte awareness to such an application without code modification by overloading multibyte counterparts on the standard string functions. For example, mb_substr() is called instead of substr() if function overloading is enabled. This feature makes it easy to port applications that only support single-byte encodings to a multibyte environment in many cases.
VolkerK
  • 95,432
  • 20
  • 163
  • 226
  • It is not recommended to use the function overloading option in the per-directory context, because it's not confirmed yet to be stable enough in a production environment and may lead to undefined behaviour. – Edson Medina Nov 08 '12 at 11:14
0

You could use libraries that extends the main multibyte functions, like:
http://code.google.com/p/mbfunctions/

For mb_trim or mb_strtr, ie.

Ignacio Lago
  • 2,432
  • 1
  • 27
  • 33