Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use bytcode sequence for unicode ellipsis #945

Merged
merged 1 commit into from

5 participants

@aleho

The codepoint for "horizontal ellipsis" is 0x2026, which enables a more
robust display of that character on different systems.

With my setup here (Firefox, Linux, Helvetica) ellipsis was not displayed correctly (replaced by a question mark indicating a missing character).

I'm not entirely sure about all that UTF stuff, but this should likely work on most modern systems I guess.

@aleho aleho Use bytcode sequence for unicode ellipsis
The codepoint for "horizontal ellipsis" is 0x2026, which enables a more
robust display of that character on different systems.
c7fda56
@dereuromark
Collaborator

you accidently committed something else, as well.

@aleho

Yeah, I always forget that github uses branches, not commits, for pull requests. Makes sense, I don't.

@markstory markstory merged commit 7e00be8 into from
@ADmad
Collaborator

This PR causes failed tests case. The character code used seems to actually cause more display problems as seen here and here.

@ADmad
Collaborator

Perhaps the display issue is because those are console outputs but the test cases surely need to be updated.

@dogmatic69

I updated my cake repo yesterday and noticed this issue, was going to check out the cause but saw this come up. This commit has fixed it for me

@markstory
Owner

I'll take a look as I merged that change in.

@aleho

I had a commit locally that addressed the tests but completely forgot about it. Who needs test cases anyway? ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 9, 2012
  1. @aleho

    Use bytcode sequence for unicode ellipsis

    aleho authored
    The codepoint for "horizontal ellipsis" is 0x2026, which enables a more
    robust display of that character on different systems.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Utility/String.php
View
2  lib/Cake/Utility/String.php
@@ -479,7 +479,7 @@ public static function truncate($text, $length = 100, $options = array()) {
if (isset($options['ending'])) {
$default['ellipsis'] = $options['ending'];
} elseif (!empty($options['html']) && Configure::read('App.encoding') == 'UTF-8') {
- $default['ellipsis'] = chr(226);
+ $default['ellipsis'] = "\xE2\x80\xA6";
}
$options = array_merge($default, $options);
extract($options);
Something went wrong with that request. Please try again.