VSCode is appending unsupported text encoding on file save - visual-studio-code

Not sure what's up with VSCode after updating to Version 1.10.2 VSCode is appending weird characters automatically after saving the file.
If I try to open the file with VSCode I get the following error.
The file will not be displayed in the editor because it is either binary, very large or uses an unsupported text encoding.
This only happens sometimes, not on every single save to disk action.
I'm using a SAMBA share, not sure if that has something to do with it.
I'm on MAC 10.12.3
** Update 3/16/17 **
Here is a gif of how it's happening.

Related

vscode the file is not displayed in the editor because it is either binary or uses an unsupported text encoding

I am trying to work by importing the photo2cartoon project from github into my vscode.
https://github.com/kairess/photo2cartoon
But some files are not read in vscode.(model_mobilefacenet,photo2cartoon_weights.pt)
When I try to open it I get the message (the file is not displayed in the editor because it is either binary or uses an unsupported text encoding)
if i click (open anyway)
and my vscode terminal say
but the files are in the same directory
how to fix this problem

VIsual Studio Code Plain Text Files

I have been searching for over 30 minutes but can't find the solution. On my Windows installation of VSCode when I create a new file (default to Plain Text as expected) and I go to save, it defaults to saving with a .txt extension. On my Mac though it defaults to All Files. I have searched through settings and I don't recall changing anything on my Windows machine but I WANT to save new files that are Plain Text with .txt by default on Mac. What am I missing?

VSCode restore file from tmp file

I Accidentally discarded some changed files in VScode and lost alot of work. I believe I have found them saved as tmp files in the
/users/appdata/local/temp/1 directory, but when I try to open it's just symbols/binary encoding that I am not familar with. These were typescript files with the extension .tsx...when I open with VScode or notepad I just see the wierd symbols which I believe are binary encoding.
Is there a way to restore the temp file to a text or typescript file???
I had a similar problem just now and I just renamed the file, changing the extension from ".tmp" to ".cs" and it worked, I lost a few lines of code but it was fine.
I don't know if this will work for every case though.

How to prevent vscode as default program to run html file?

When I double click a html file, it will be automatically opened in vscode. I set Firefox as default program and it works fine, but every time after I reboot, Visual Stadio Code - URL Handler still be the default program to open a html file.
I use linux mint 18.3, it only happens after vscode upgrade to 1.28
Right click on the file in the chosen format and choose Open With... -> Other Application or Open With Other Application.
Don't forget to check the Remember this application for "..." files checkbox to apply your selection for all files of the same format.
As discussed here

Visual Studio 2012 strange characters at beginning of file

Whenever i copy a file made in VS2012 over to Eclipse, and open the file in Eclipse doc viewer there always seem to be some extra characters at the beginning (pic below). They arent visible in VS2012, or if I open the file in Notepad. What character is that being put there, and how can i get it to stop? Below is a pic of a JS file I made i VS, and how it appears in Eclipse
Thats a UTF8 BOM, Ive heard thgis works well for windows
http://www.bryntyounce.com/filebomdetector.htm
If you have access to linux you can use awk to remove