multihack-brackets icon indicating copy to clipboard operation
multihack-brackets copied to clipboard

Support syncing non-utf8 files

Open siphomateke opened this issue 7 years ago • 7 comments

Non-text files such as images and fonts get corrupted on sync. Not sure if this is expected. Perhaps if it can't handle non-text files then it shouldn't attempt to sync them at all rather than corrupting them.

siphomateke avatar Jun 09 '17 14:06 siphomateke

I've noticed this too. Will look into it.

t-mullen avatar Jun 09 '17 17:06 t-mullen

Seems to be an issue with how Brackets handles non utf-8 encodings. Waiting on adobe/brackets#13518

t-mullen avatar Jul 04 '17 19:07 t-mullen

Binary has no built-in binary file support, so I've moved to Node.js. Unfortunately this means we need to do an "initial write" with a different API (as Node can't do the replaceRanges that Brackets can). YJS is being tricky about this, so it'll take some time. :/

t-mullen avatar Jul 09 '17 23:07 t-mullen

Some major changes are needed to add this "dual file type" syncing. It all feels very hacky and I'm seeing a lot of issues so I'd prefer to wait until Brackets supports binary files natively.

The next version will just ignore non-utf8 files. (They won't be synced). I don't think this will be that big of an issue, since you can't really "collaborate" on an image.

t-mullen avatar Jul 10 '17 17:07 t-mullen

@RationalCoding That's unfortunate. I was actually going to suggest just ignoring non-utf8 files until then.

siphomateke avatar Jul 10 '17 17:07 siphomateke

There is a new release of Brackets coming soon that updates the appshell, hopefully that fixes it.

t-mullen avatar Jul 10 '17 18:07 t-mullen

Brackets improved their support in 1.10, so most files sync normally now. I still get a few "Unsupported Encoding" errors around .ico files, but for the most part things seem to be working (jpegs, pngs, fonts...)

I'm going to close this, since this proves any remaining errors are Bracket's fault.

t-mullen avatar Sep 14 '17 23:09 t-mullen