There are so many parts to this I am not sure how to tackle it. Should all JS and CSS be imported with the document encoding? I personally won't use anything different than UTF-8 I think. Since I am not necessarily coding this for outside use, maybe that should be good enough...I need to think about it.
Edit: So far, this is what I think it should do:
[x] By default, in all cases, utf-8 is assumed.
[x] Write out the HTML with UTF-8 unless template encoding is specified to be different. Maybe allow an optional specification for output encoding if desired.
[x] For JS, CSS, and References, allow a notation file.ext;encoding, and that file will be read in with the specified encoding, but they will be output with the main content's encoding since they are exported as part of that documents content.
[x] External CSS needs to define their own @charset encoding. In this case file.ext;encoding would be ignored.
[x] External JS can use charset in the script tag, and that will be acquired from file.ext;encoding if provided.
[x] Should write out with errors="xmlcharrefreplace"
There are so many parts to this I am not sure how to tackle it. Should all JS and CSS be imported with the document encoding? I personally won't use anything different than UTF-8 I think. Since I am not necessarily coding this for outside use, maybe that should be good enough...I need to think about it.
Edit: So far, this is what I think it should do:
utf-8
is assumed.file.ext;encoding
, and that file will be read in with the specified encoding, but they will be output with the main content's encoding since they are exported as part of that documents content.@charset
encoding. In this casefile.ext;encoding
would be ignored.charset
in the script tag, and that will be acquired fromfile.ext;encoding
if provided.errors="xmlcharrefreplace"