Page MenuHomePhabricator

File contents do not show up if content is not valid utf-8
Closed, ResolvedPublic

Description

e.g. https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/wmf-config/flaggedrevs.php;5726e947e7998adf64503cb51ba30879c7fb4e92$38 does not show if syntax highlighting is disabled.

I suspect this is due to the illegal utf-8 octets on line 38:

$wgFlaggedRevsWhitelist = [ 'الص�?حة_الرئيسية' ];

The syntax highlighted version simply omits (part of) that line.


Upstream task: https://secure.phabricator.com/T3788

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 3 2016, 4:35 PM
Paladox added a subscriber: Paladox.Sep 3 2016, 4:57 PM

This should be filled upstream please?

Luke081515 updated the task description. (Show Details)Sep 3 2016, 5:01 PM
Luke081515 added a project: Phabricator.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptSep 3 2016, 5:01 PM
Luke081515 moved this task from To Triage to Upstream on the Phabricator board.Sep 3 2016, 5:01 PM
Luke081515 edited projects, added Phabricator (Upstream); removed Phabricator.
Restricted Application added a project: Upstream. · View Herald TranscriptSep 3 2016, 5:01 PM
Luke081515 triaged this task as High priority.Sep 3 2016, 5:02 PM
Luke081515 moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.EditedSep 3 2016, 9:33 PM
Luke081515 added a subscriber: Luke081515.

Reported upstream: https://secure.phabricator.com/T11585, after I reproduced it locally.

Aklapper lowered the priority of this task from High to Medium.Sep 4 2016, 12:58 PM
Aklapper updated the task description. (Show Details)

The syntax option has been removed in the new phabricator update. Syntax highlighting is on by default now and carn't be switched off.

I can no longer reproduce this.

The file is now automatically detected as SHIFT-JIS and converted on display, which is probably incorrect, but seems like a reasonable guess because the file is not valid UTF-8 but is valid SHIFT-JIS.

If you force the encoding to UTF-8 (View OptionsChange Text Encoding), content is mangled but not omitted with highlighting on or off (View OptionsHighlight As... and selecting "Plain Text" disables highlighting).

Aklapper closed this task as Resolved.Mar 23 2019, 7:11 PM

Assuming this is fixed as per last comment and upstream https://secure.phabricator.com/T3788 (thanks for the followup!).

Please reopen this task if this still happens to you nowadays in Phabricator.