Categories > TinyButStrong general >

limited text(ope=max:) with MultiByte Character problem

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ym young
Date: 2008-06-02
Time: 04:20

limited text(ope=max:) with MultiByte Character problem

as you can image,limited  MultiByte Character will encounter half(1/3,1/4) char display problem.is it possible to solve it?
By: Skrol29
Date: 2008-06-02
Time: 22:25

Re: limited text(ope=max:) with MultiByte Character problem

Hi,

Parameter "maxhtml" is done for that.

http://www.tinybutstrong.com/manual.php#html_field_prm_ope
By: ym young
Date: 2008-06-03
Time: 03:18

Re: limited text(ope=max:) with MultiByte Character problem

thanks

I appreciate TBS!
By: ym young
Date: 2008-06-07
Time: 20:09

Re: limited text(ope=max:) with MultiByte Character problem

Sorry,I did test what you suggested,seems got misunderstanding.
I use limited text to cut unicode multilanguage chars,the problem
is that half char will be splitted,the text retrieved from mysql(
charset utf8).If  cut with sql substr function,it is ok.But use TBS  limited text,half char problem occured.
By: Skrol29
Date: 2008-06-08
Time: 17:34

Re: limited text(ope=max:) with MultiByte Character problem

Can you give an example ?
By: Alan Lake
Date: 2009-12-14
Time: 15:16

Re: limited text(ope=max:) with MultiByte Character problem

Can you give us an example of this in a UTF-8 environment?
By: Alan Lake
Date: 2009-12-14
Time: 15:38

Re: limited text(ope=max:) with MultiByte Character problem

This doesn't seem to work right: "Price: £ 123.45 ±" when used with
<td class="back-special2">[onload.name;ope=max:10;maxhtml;htmlconv=no]</td>
By: Skrol29
Date: 2009-12-16
Time: 10:18

Re: limited text(ope=max:) with MultiByte Character problem

Hi Alan,

It works ok for me. The displayed result is
Price : £...
I have TBS 3.5.1 with PHP 5.2.9, but it should work the same with TBS 3.4.
Test with both latin and utf-8 charset.
By: Alan Lake
Date: 2009-12-16
Time: 10:38

Re: limited text(ope=max:) with MultiByte Character problem

Hi Skrol,

OK.  I just expected it to regard the "&pound;" as 1 character, which would return to me
Price: £ 1
.
By: Skrol29
Date: 2009-12-16
Time: 13:29

Re: limited text(ope=max:) with MultiByte Character problem

It does count "&pound;" as 1 character. But the cutting symbol "..." takes place for the last character. You can change it using parameter "maxend".