- From: Tab Atkins Jr. <notifications@github.com>
- Date: Tue, 25 Mar 2025 16:08:06 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/url/pull/804/review/2715395675@github.com>
@tabatkins commented on this pull request. > @@ -2038,8 +2038,9 @@ and <a>code points</a> in the range U+00A0 to U+10FFFD, inclusive, excluding <a> <!-- IRI also excludes the ranges U+E000 to U+F8FF, U+FFF0 to U+FFFD, and U+E0000 to U+E09FF, all inclusive. We don't to align with HTML. --> -<p class=note>Code points greater than U+007F DELETE will be converted to -<a lt="percent-encoded byte">percent-encoded bytes</a> by the <a>URL parser</a>. +<p class=note>For historical reasons, rather than storing codepoints and [=byte/percent-encoding=] +to ASCII for serialization, URLs instead store their value as ASCII internally, eagerly converting +code points greater than U+007F DELETE to [=percent-encoded bytes=] during [=URL parser|parsing=]. The "for historical reasons" was me assuming and editorializing. (It seemed like a weird thing to do! It's not usually good practice to encode into the byte format immediately; usually you hold it in the good data model and only encode at the edges, when you have to hit the wire.) If that's not true, and it really is just a quirk of the model, I can rephrase that bit. And this section is about writing URLs, sure, but there was *already* a note about how those codepoints you write will be encoded. I was just rewriting the note for (imo) better clarity. If there's a better place to make this note, I can move it there, but this section does seem relatively germane to what the note is saying (since URLs can "contain" high codepoints, but the actual internal representation is ASCII-only). -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/pull/804#discussion_r2013053275 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/url/pull/804/review/2715395675@github.com>
Received on Tuesday, 25 March 2025 23:08:10 UTC