bug #440940 by Scott Reynolds: changed mb_substr and mb_strlen to drupal_substr and drupal_strlen respectively