Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Error: Cannot Render Binary File on C# repo #51

Closed
wwaller opened this issue Mar 25, 2018 · 2 comments
Closed

Error: Cannot Render Binary File on C# repo #51

wwaller opened this issue Mar 25, 2018 · 2 comments
Assignees

Comments

@wwaller
Copy link

wwaller commented Mar 25, 2018

  • Issue type: Bug report
  • Sourcegraph version: sourcegraph.com

Steps to reproduce:

  1. Go here to NotifyIconAdv.cs of the OpenHardwareMonitor repo. Issue also happens with Utilities/EmbeddedResources.cs file in same repo, and Hardware/PInvokeDelegateFactory.cs, and Hardware/TBalancer/TBalancerGroup.cs.
  2. See "Error: Cannot render binary file".

My initial guess is the use of the DllImportAttribute in all the files except for EmbeddedResources.cs. But I'm not familiar enough with the implementation to know why that would be relevant.

image

@keegancsmith
Copy link
Member

The linked file is not valid UTF-8. The ö in Michael Möller is encoded as the single byte 0xF6, which is invalid for UTF-8. Github is likely doing some sort of encoding detection on the file. You can see how your browser interprets the raw file to see it likely fails (atleast does on my system) https://raw.githubusercontent.com/openhardwaremonitor/openhardwaremonitor/e199e0ccc69b4da92495266ebc0faf7daad97608/GUI/NotifyIconAdv.cs

We currently expect UTF-8 in all files. I am guessing our binary file detector could be a bit more lenient, and the syntax highlighter may just work.

@nicksnyder
Copy link
Contributor

Potentially related to #32

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants