zedapp / zed

Rethinking code editing.
http://zedapp.org
MIT License
2.22k stars 161 forks source link

github repository open fails...for characters in file? #568

Closed sagefic closed 8 years ago

sagefic commented 8 years ago
* [log] Fetching file list...
* [error] Could not load file: /content/redacted.md {
  stack: "Error: Failed to execute 'btoa' on 'Window': 
The string to be encoded contains characters
 outside of the Latin1 range.\n    at Error (native)\n    at chrome-
extension://pfmjnmeipppmcebplngmhfkleiinphhp/js/fs/github.js:387:50"

This was a markdown file i (unwisely) copied to google docs editor for spellcheck (current spellcheck plugin failed to do anything meaningful once i installed it).

Copying back the spellchecked result to zed seemed to work, but then zed saw no "changes" to the edited file.

Meanwhile, I committed the edit via the github.com website editor.

Now whenever i sync the repository, I get that error in the log. visual inspection doesn't show any funky characters in the document (but i assume they must be there).

Is this purely a problem with my file? Or should zed be able to handle this? (the github.com website shows it fine).

When i can, I will open the file in a desktop editor and see if i can strip out any weird characters...will post back if that fixes this up.

p.s. Probably not relevant, but there is another error in the log:

[error] Error while emitting configchanged 
Cannot read property 'css' of undefined TypeError: 
Cannot read property 'css' of undefined
    at setEditorTheme (chrome-extension://pfmjnmeipppmcebplngmhfkleiinphhp/js/theme.js:79:39)
    at null.<anonymous> (chrome-extension://pfmjnmeipppmcebplngmhfkleiinphhp/js/theme.js:29:25)
    at EventEmitter.emit (chrome-
extension://pfmjnmeipppmcebplngmhfkleiinphhp/js/lib/events.js:47:30)
    at chrome-extension://pfmjnmeipppmcebplngmhfkleiinphhp/js/config.js:308:26
sagefic commented 8 years ago

quotes

I have a lead.

sagefic commented 8 years ago

Yep, that was it. Google docs automagically added "matched" quotes, which were "outside of the Latin1 range"

I opened the file in notepad++ (/ht @donho), with the TextFx plugin (/ht @severach) and ran "zap all non-printable characters to #"

This, with the diff, showed me the matched single and double quotes that had been sprinkled without. Thanks google docs! :angel:

zefhemel commented 8 years ago

That's really odd, it should just all be parsed as UTF8...