Smarty template engine - truncate and utf-8

Discussion in 'Content Management' started by jan.onesork, Mar 7, 2006.

  1. #1
    Hello,
    I'm trying to learn, how to work with SMARTY. But I have one problem: If I want to write one variable (up to 300 characters) I write:

    {$var|truncate:300:"..."}
    Code (markup):
    But it writes less than 300 characters - only about 150.

    Can it be caused by utf-8? What can I do with that?
     
    jan.onesork, Mar 7, 2006 IP