multihack-brackets
multihack-brackets copied to clipboard
Support syncing non-utf8 files
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.
I've noticed this too. Will look into it.
Seems to be an issue with how Brackets handles non utf-8 encodings. Waiting on adobe/brackets#13518
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. :/
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.
@RationalCoding That's unfortunate. I was actually going to suggest just ignoring non-utf8 files until then.
There is a new release of Brackets coming soon that updates the appshell, hopefully that fixes it.
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.