- From: Anne van Kesteren <notifications@github.com>
- Date: Mon, 19 Oct 2020 02:16:34 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 19 October 2020 09:16:47 UTC
If you look at the number of state transitions (hint: count `%1B` instances) in the example below you can see that invoking the encoder code-point-by-code-point does not match implementations. ```js function encode(input, output, desc) { test(function() { var a = document.createElement("a") // <a> uses document encoding for URL's query a.href = "https://example.com/?" + input assert_equals(a.search.substr(1), output) // remove leading "?" }, "iso-2022-jp encoder: " + desc) } encode("\uFF90\u4F69", "%1B$B%_PP%1B(B"); encode("\uFF90a\u4F69", "%1B$B%_%1B(Ba%1B$BPP%1B(B"); ``` There might be a related thing here, discovered in https://github.com/web-platform-tests/wpt/pull/26158 by @JKingweb, that implementations skip invoking encoders if the input is entirely in the ASCII range. (Again, something that uniquely applies to ISO-2022-JP. Form submission should be checked here as well before deciding on something.) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/issues/557
Received on Monday, 19 October 2020 09:16:47 UTC