If we were to replace the original data: URIs with srcdoc, I found that the charset is always got from channel, see nsDocument::TryChannelCharset, and the charset value will be 'UTF-8'. So I move those data: URIs to seperate files.