I was checking how Views was trimming text fields because I have problems with accentuated characters (Views consider these characters as word boundaries) and just discovered a little tiny detail that could be very easily solved.

    if (!empty($alter['ellipsis'])) {
      $value .= '...';
    }

It could be like this, using the ellipsis character instead of three dots:

    if (!empty($alter['ellipsis'])) {
      $value .= '…';
    }

Typographically speaking, it is much more appropiated.

By the way, I haven't found a clue about Views chopping words with accents yet…

CommentFileSizeAuthor
#2 views_handler_field.patch441 bytestomgf

Comments

merlinofchaos’s picture

It is because that preg function used to find boundaries is not multi-byte safe and there isn't, as far as I can tell, a multi-byte alternative I can use.

The ellipsis thing makes some sense. CAn I get a real patch?

tomgf’s picture

StatusFileSize
new441 bytes

I have attached the patch here.

Note: iit's the first one I provide so please tell me if there is something wrong.

dagmar’s picture

Status: Active » Needs review
merlinofchaos’s picture

Status: Needs review » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.