Page MenuHomePhabricator

Zero space unicode word joiner is causing ? utf characters in DifferentialChangesetTwoUpRenderer
Closed, ResolvedPublic

Description

Hi guys,

The $zero_space = "\xE2\x81\xA0"; (see below) seems to be creating ? utf characters in the two up diff view.
https://secure.phabricator.com/diffusion/P/browse/master/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php;cd829434d49dce85b09591c52bdb2db9228ae194$291

I'm seeing the same issue on secure.phabricator.com.

Adding a space before the unicode seems to fix it. $zero_space = " \xE2\x81\xA0";

Seen in Chrome v 33.0.1750.154 m on Windows.
Looks fine in Firefox 28

Cheers,

Chris

{F140747}

Event Timeline

zorfling assigned this task to epriestley.
zorfling raised the priority of this task from to Needs Triage.
zorfling updated the task description. (Show Details)
zorfling added a subscriber: zorfling.

From the screenshot, it looks like this is an issue only with empty lines, so adding a space before the word joiner on empty lines seems like a fairly reasonable fix to me.

Doesn't happen only on empty lines. In my installation this shows also on some other lines -- specifically the first few lines of each file, up to the first opening brace (this definition is not rigorously tested).

EDIT: a more reasonable definition is "all lines that don't start with an indent" (duh).

Until we figure out exactly how to move forward on this without creating new problems, you could do this locally as a workaround:

$zero_space = "";

That will break copy-paste out of Differential (you'll get all the text you selected, instead of just the right hand side of the diff), but fix all the UI glitches.

Avish added a subscriber: Avish.