Created attachment 704184 [details] [diff] [review] fix v1 This replaces <!--CLEAR--> with the following document: <!DOCTYPE html><meta charset="UTF-8"><!--CLEAR--> I added the DOCTYPE as well because view-source was complaining at me (highlighting <meta> in red) if I didn't declare a doctype. With that and the <meta> tag, both view-source and the error console are happy with this, so I think it should silence the JS-error-output.
Comment on attachment 704184 [details] [diff] [review] fix v1 With data URIs, I'd rather have the charset in the MIME type than in the contents, i.e., the properly-escaped version of: data:text/html;charset=UTF-8,<!DOCTYPE HTML><!--CLEAR--> r=dbaron with that (assuming it works)
That's cleaner, thanks! We won't need <!DOCTYPE html> after all then -- that was only to make the parser happy about the <meta> tag. Also, it looks like semicolon, equals, dash, and comma characters in ";charset=UTF-8," have to be unescaped, or else it's not recognized (we still post an error-console warning and/or the page pops up a 'save' dialog because it doesn't get to correctly parsing the mimetype). So I've left those unescaped. So, the fix is literally to just insert ";charset=UTF-8" into the hardcoded string, just before the comma. I'll push that later today.
Try run, for the same platform/test-run as in comment 0, w/ the patch applied, has no character encoding errors reported, so I think that demonstrates that this works: https://tbpl.mozilla.org/php/getParsedLog.php?id=18965437&tree=Try (Incidentally, I misspoke in comment 0 -- this is for b2g test-runs, not Android test-runs)