truncate - utf8
| From: | Simon Benjamin | Date: | Fri, 19 Jan 2007 19:24:36 +0000 |
| Subject: | truncate - utf8 | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2935@lists.php.net to get a copy of this message | ||
Hello,
I'm use utf-8 database, file / template encoding, headers, etc. The
truncate modifier use strlen() function, the func doesn't work for
extended chars, example: árvívtûrõ tükörfúrógép
echo strlen('árvívtûrõ tükörfúrógép'); // 31
echo mb_strlen('árvívtûrõ tükörfúrógép', 'utf-8'); // 22
--
udv, Benjamin