- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 14 Sep 2023 08:21:40 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `URL encoding of CSS values`, and agreed to the following: * `RESOLVED: for all urls we encode them as utf-8 when they go down the network stack` <details><summary>The full IRC log of that discussion</summary> <emilio> TabAtkins: basic question is what encodings are used by things in the platform to parse URLs<br> <emilio> ... there's very little interop<br> <emilio> ... but with the tests that show up right now it seems everybody uses utf-8 for @import<br> <emilio> ... but in a stylesheet it uses whatever the stylesheet encoding is<br> <emilio> ... annevk wants to make it explicit<br> <emilio> ... is everyone fine with that?<br> <miriam> q?<br> <miriam> ack TabAtkins<br> <emilio> ... zcorpan mentions that firefox using utf-8 for all URLs<br> <emilio> ... and seems to be fine with that<br> <emilio> ... nobody is concerned about compat fallout<br> <chris> I would prefer to use UTF-8 always<br> <chris> q+<br> <emilio> ... nobody really uses non-ascii-compatible stuff<br> <emilio> ... so really just a question of standardizing it<br> <miriam> ack chris<br> <emilio> ... two choices: all urls are utf-8, or @import utf-8 and sheet encoding for the rest<br> <fremy> q+<br> <emilio> chris: I'd prefer utf-8 everywhere<br> <emilio> emilio: +1 to that, seems better to be consistent<br> <miriam> ack fremy<br> <emilio> fremy: is that likely to create invalid files?<br> <myles> q+ to ask a silly question<br> <bramus> +1 to chris’s remark<br> <emilio> emilio: wdym as invalid?<br> <emilio> fremy: you may end up with content that is not parsable in the encoding<br> <emilio> TabAtkins: fix is using utf-8<br> <emilio> fremy: why do we bother to allow utf-8 if the file is in a different encoding<br> <emilio> TabAtkins: it's not when you parse the file, it's about how you feed it to the url parser<br> <miriam> ack myles<br> <Zakim> myles, you wanted to ask a silly question<br> <emilio> myles: is the proposal that a stylesheet is in an encoding, you find a url and switch encoding?<br> <emilio> TabAtkins: no, you parse as normal but you feed the url parser telling it that it's utf-8<br> <andreubotella> IIUC this is for url-encoded bytes (%20 and so on)<br> <miriam> ack dbaron<br> <emilio> dbaron: there is a very old backwards compat behavior which is that URLs carry around the encoding of the document that contained them<br> <emilio> ... so that when the network fetch happens you send the bytes to the server instead of a decoded version of them<br> <emilio> ... ideally that should only happen when this backwards compat hack is required<br> <emilio> ... and has been phased out generally to use utf-8 rather than that<br> <emilio> myles: so you get a file, decode decode decode, some stylesheet has a URL and you need to go back and send those bytes rather than the decoded stuff?<br> <emilio> dbaron: the new old way of doing it, not the old old way, is that you store the encoding of the thing in which you found the url along the url<br> <emilio> ... purpose of that is that the server gets the same bytes as the document<br> <emilio> ... which is a horrible hack to mimic the old old behavior<br> <emilio> ... which was where the web just carried bytes around<br> <emilio> myles: So the new old behavior is you round-trip (go bytes to encoding, and then when the request go back to bytes)<br> <emilio> dbaron: yeah, and there's a migration away from that where we just send utf-8 to the server<br> <emilio> ... not sure what the status of that migration is<br> <emilio> ... clearly there's a difference between @import and other urls here<br> <emilio> myles: so proposal at hand is you decode, see a url, then decode those bytes as utf-8?<br> <emilio> TabAtkins: dbaron explained it better, when we put the url in the network stack we just stop carrying that encoding and always put it as utf-8<br> <emilio> myles: perfect<br> <emilio> dbaron: hope my memory about this is right<br> <emilio> TabAtkins: proposal is for all urls we encode them as utf-8 when they go down the network stack in accordance with the url standard's recomendation<br> <emilio> RESOLVED: for all urls we encode them as utf-8 when they go down the network stack<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9301#issuecomment-1718985866 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 14 September 2023 08:21:42 UTC