With the following code: u = new URL('http://abc/'); u.pathname = "/?é"; console.log(u.pathname); The string "/%3F%C3%83%C2%A9" is printed. But this is wrong, since é in UTF-8 is 0xC3 0xA9. If we remove the ?, everything works fine: u = new URL('http://abc/'); u.pathname = "/é"; console.log(u.pathname); // prints "/%C3%A9"
Created attachment 429539 [details] Patch
Thanks for pointing this out, Timothy!
Comment on attachment 429539 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429539&action=review r=me > Source/WTF/ChangeLog:10 > + This matches Chrome, Firefox, and reason. :)
Committed r278091 (238166@main): <https://commits.webkit.org/238166@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429539 [details].
<rdar://problem/78520238>