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 created this task.Apr 8 2014, 6:23 AM
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.

Avish added a subscriber: Avish.EditedApr 8 2014, 11:29 AM

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.

epriestley edited this Maniphest Task.Apr 9 2014, 12:52 AM
sophiebits edited this Maniphest Task.Apr 9 2014, 12:56 AM
sophiebits closed this task as Resolved.Apr 9 2014, 12:56 AM

Closed by commit rPa7272dfb03d0.

Avish removed a subscriber: Avish.Apr 9 2014, 8:08 AM
Avish added a subscriber: Avish.