codes like this dosen't support UTF-8 multibyte characters

 for ($i = 0 ; $i < strlen($rawalphabar) ; $i++)
    {
         .....
    }

Comments

fgm’s picture

This seems likely. What do you suggest to fix it ?

Lebowski’s picture

The code at line 131 should be like this:

 for ($i = 0 ; $i < drupal_strlen($rawalphabar) ; $i++)
    {
    $ret[] = l(drupal_substr($rawalphabar,$i,1), G2PATHINITIAL . '/' . urlencode(drupal_substr($rawalphabar,$i,1)), NULL, NULL, NULL, TRUE).'&nbsp;';

    }
	return $ret;
  }

fgm’s picture

Status: Active » Fixed

Fix included in 1.15.2.9. I did a variant on your suggestion, though:

  • cache the result of drupal_substr($rawalphabar,$i,1) in a variable to avoid a double call to a heavy function
  • removed the trailing &nbsp; you added: themes can add it if wanted, but I don't consider HTML belongs in a link array
Anonymous’s picture

Status: Fixed » Closed (fixed)