mfuentesg / SyncSettings

Sync Settings - The cross-platform solution to keep Sublime Text configuration synchronized
https://mfuentesg.dev/SyncSettings
MIT License
288 stars 38 forks source link

fix json encode (forcing UTF-8) #166

Closed TerminalFi closed 4 years ago

TerminalFi commented 4 years ago

fixes #165 fixes #164

Problem

gist requires valid JSON. JSON must be UTF-8 encoded in order to be valid.

Solution

We encode out data to UTF-8 prior to upload.

TerminalFi commented 4 years ago

@mfuentesg this solves those problems. Or if you want to handle it exactly like json I can update this to escape unicode with a \ which is what python json does.

TerminalFi commented 4 years ago

Failed due to wrong order of dump but contain is the same. Hopefully this is how you meant.

mfuentesg commented 4 years ago

Hey @TheSecEng thanks for your proposal, but i am avoiding as max i can sublime or sublime_api functions, because are a black box to me, i don't know what is happening behind.

I will close this PR in favor or https://github.com/mfuentesg/SyncSettings/pull/168

Feel free to share your thoughts there.

TerminalFi commented 4 years ago

Sure, as long as we can handle comments I am fine with moving back to it. I will update my location pr. Sorry for any trouble with moving to sublime functions

mfuentesg commented 4 years ago

@TheSecEng no problem, you are welcome to help me solving the open issues, because i don't have bandwidth at all hahaha.