[drupal-devel] PHP string functions overloading for multibyte support

Piotr Szotkowski shot at caltha.pl
Thu May 26 20:32:08 UTC 2005


Dries Buytaert:

> Maybe we should document this in settings.php and overwrite the
> PHP settings (in the unlikely event that someone enabled mb_string
> globally)?

Shouldn't we rather go the other way, i.e. use strlen() for getting
the character length, not the byte length of strings? As far as
I understand, Drupal is internally UTF-8 only; wouldn't it be logical
to have the string functions consider the strings as UTF-8 ones?

As far as I understand, Drupal requires modules to use the truncate_utf8
function anyway, and fixing it to check whether it's overloaded or not
(and react accordingly) is easy...

-- Shot
      She was good at playing abstract confusion in the same way a midget
      is good at being short.            -- Clive James on Marilyn Monroe
====================== http://shot.pl/hovercraft/ === http://shot.pl/1/125/ ===

More information about the drupal-devel mailing list