I've notice that with accented characters (so french !!)
like that:
strlen("câble" * imagefontwidth(FONTSIZE));
this command give a string length bigger than it is in reality
so you have to pass the chain in utf8 decode before
strlen(utf8_decode("câble") * imagefontwidth(FONTSIZE));
that's all (sorry for my english !)