truncate - utf8
Simon Benjamin <[email protected]> Fri, 19 Jan 2007 20:24:36 +0100
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Organization | CRAFTCORE |
| Message-ID | <[email protected]> |
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
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php