Hello
UTF8 characters are 1-3 bytes,
--
FLEXIcontent text cut off function is quite smart as it detects many problems and avoids them
e.g.
it will not cut an UTF8 character halfway,
it will count string length properly,
it will add space in case of "more<some_html_tag>words" making it "more words" and not "morewords"
etc ... !!
--
in case of single quote there is a problem indeed (that is what is happening in your case)
-- you can text a fix, report back, and i will apply it to FLEXIcontent distributions:
in components/com_flexicontent/classes/flexicontent.helper.php
find about (at about line 778)
Code:
// Calculate length according to UTF-8 encoding
$length = JString::strlen(htmlspecialchars( $cleantext ));
// cut the text if required
if ($chars) {
if ($length > $chars) {
$cleantext = JString::substr( htmlspecialchars($cleantext, ENT_QUOTES, 'UTF-8'), 0, $chars ).'...';
}
}
and replace with
Code:
// Calculate length according to UTF-8 encoding
$length = JString::strlen($cleantext);
// Cut off the text if required
if ($chars) {
if ($length > $chars) {
$cleantext = JString::substr( $cleantext, 0, $chars ).'...';
}
}
// Reencode HTML special characters, (but do not encode UTF8 characters)
$cleantext = htmlspecialchars($cleantext, ENT_QUOTES, 'UTF-8');
PS: filter can be compacted if you want, also the can have more appearances than drop down selection, e.g. radios, or checkboxes or tag-like selection etc (see new filtering parameters in field configuation)