-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to open binary files in the text editor as explicit user gesture #1218
Comments
@freezestudio can you attach the file please? |
GitHub Setup error log file: |
The file is containing null bytes which we then detect as binary type. However the file seems to use UTF 16 as encoding. We only support that if the file has a BOM in the beginning. I think other editors just try to open the file with UTF 16 if they detect null bytes but this can also fail. I think we should allow to change the encoding from the editor in all cases even if we think the file is binary. |
This one feature prevents us from using VS Code here at work. We often have Markdown files with embedded null bytes (and other non-printable characters). |
@iffy may I ask why your markdown files contain null bytes? |
That's a fair question :) We produce reports about network protocols, some
of which contain non printable characters. We strip, hide or convert the
unprintables (using some custom markup) before producing PDFs, but want to
retain the original binary data within the source.
On Apr 12, 2017 11:42 AM, "Benjamin Pasero" <notifications@github.com> wrote:
@iffy <https://github.com/iffy> may I ask why your markdown files contain 0
bytes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1218 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJ3v_DFoFVcY7lFfnRBGQSDHHrZ1p3zks5rvQ0AgaJpZM4G0Ftg>
.
|
I tried... I changed it to add a button labeled "Open anyway" but since this code base is enormous and unfamiliar, I have no idea what function to call to open a file, let alone with an explicit encoding :) Somewhere down the |
Yeah sorry, the code is quite complex. You could start to debug through how editors open e.g. by adding a breakpoint to |
@bpasero what about a couple lines up |
There should probably be a way to control this when opening that file to override. |
Could we just have a setting to always open whatever we tell it to open? Don't worry about protecting me from myself... ;) |
That's insane and has to be fixed. I just tried to open a couple of files WER generated and... no go. Not only it is unreasonable not to open UTF-16 encoded text files without a BOM since there too many of those files out there, it is completely ridiculous when Microsoft itself generates such files all over the place.
I agree. But... Two years and still nothing? -"The file will not be displayed because is it either binary, very large or an unsupported text encoding." That's how it sounds. Being able to open text files is the first requirement from a source code editor, or an advanced text editor, or any text editor... |
When I install GitHub Windows client, it generates an error, error details recorded in the
X: \ Users \ xxx \ AppData / Local \ Temp \ VSD75A.tmp \ install.log
File, I use vscode open it, but to give tips:
The file can not be dispalyed in the editor because it is either binary, very large or uses an unsupported text encoding.
Another: Use sublime text or notepad turns on properly.
Shall not, with a hex editor to open were compared and found need to start BOM information (FF EF or EF FF) vscode open file required documents, but did not use UTF8 encoding BOM information can also be opened.
Another: The install.log encoding format to Unicode text files, the file size is 9kb.
The text was updated successfully, but these errors were encountered: