Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode is garbled #35

Closed
cburgmer opened this issue Jun 4, 2014 · 1 comment
Closed

Unicode is garbled #35

cburgmer opened this issue Jun 4, 2014 · 1 comment

Comments

@cburgmer
Copy link
Owner

cburgmer commented Jun 4, 2014

Unicode in HTML documents is garbled when loading URLs in the browser.

Background:

To render both images and HTML currently everything is loaded as binary and thus non-ASCII text is not correctly decoded. Apparently XHR needs to be told in advance whether binary data or text is expected and thus doesn't leave us with many choices.

Solutions:

  • Find a workaround for loading both types through once request
  • Do 2 requests worst case, a second one in case the first was the wrong binary/text setting
  • Detect content tpye from path extension (.png, .gif, .jpe?g -> binary, * -> text)
@cburgmer
Copy link
Owner Author

cburgmer commented Jun 4, 2014

Quick spike shows that using XHR2 it is possible to load a blob from binary and text sources, and then depending on the MIME header use FileReader.readAsBinaryString() or FileReader.readAsText()), so option 1 is looking good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant