RFC: require UTF-8 resources to use new web features
Reported by
rodger.c...@gmail.com,
Mar 5 2018
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15 Steps to reproduce the problem: Websites have inconsistent character encoding, requiring user-agents and scripts to internally convert. This is largely due to historical use of region-local character encodings which have since been superseded by Unicode, and in some cases due to UTF-16 being adopted before UTF-8 was available. Legacy character encodings today are in a similar position to plaintext HTTP. Obviously they don't have similar security implications, but their availability for backwards-compatibility existing sites allows new sites to be created using them, which forces them to continue to be supported indefinitely. This can be improved. For HTTPS, Chromium has deprecated availability of new web features on legacy origins (https://www.chromium.org/Home/chromium-security/deprecating-powerful-features-on-insecure-origins). This allows existing sites to continue to work, while discouraging legacy behavior in new development. I propose that similar action be taken for pages whose HTML is not valid UTF-8. This could be implemented similarly to the insecure-origin deprecations: begin by not allowing newly-added features to work on legacy pages, then add warnings in the console. As there's no security implication, there's no need to actively break any current pages by removing support for features that have already shipped. What is the expected behavior? What went wrong? Microsoft never removed the concept of regional character encodings from new Windows installations, various tools never switched to use UTF-8 instead of the system locale, and nobody ever seriously discouraged this behavior for single-script pages. Did this work before? No Chrome version: 64.0.3282.186 Channel: stable OS Version: OS X 10.13.4 Flash Version: I mentioned page HTML in particular. The same could be applied to other resources, but there are some interesting questions around which it would make sense for. JS? CSS? Frame content? Only content with the same origin?
,
Mar 6 2018
The issue seems to be a feature request. Hence, marking it as untriaged for further inputs from dev team. Thanks...!!
,
Mar 6 2018
,
Mar 6 2018
,
Mar 7 2018
This proposal is not about any specific components. I would suggest closing this issue and starting a thread in blink-dev@ (or somewhere in whatwg / w3c).
,
Mar 12 2018
,
Apr 27 2018
Please engage whatwg/w3c |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by krajshree@chromium.org
, Mar 6 2018Labels: Needs-Triage-M64