When I copy a UTF-8 URL from the browser\'s address bar (almost any browser on any os), then try to paste it in another text field (to post it on facebook or twitter for exa
You can use Chrome extension called "Copy Unicode URLs", which I created. It is:
If you love my work then, please, donate some sum here.
The best answer I found tell now is using this Chrome extension: https://chrome.google.com/webstore/detail/copy-cyrilic-urls/alnknpnpinldhpkjkgobkalmoaeolhnf?hl=en-US
which enables me to copy the url (in a decoded state) with only one click :)
The URI you get by copying from the address bar is the only valid URI the browser can give you.
From the RFC 3986 (and other URL RFCs):
A URI is a sequence of characters from a very limited set: the letters of the basic Latin alphabet, digits, and a few special characters.
So: https://www.chaino.com/وذكر
Is an invalid URI, yet a valid IRI (International Resource Identifier), that your browser will convert to a valid URI while requesting the server over HTTP (HTTP does not allow IRI, only URI).
TL;DR: Your browser is giving you what you expect: A valid URI that you can use everywhere, not an IRI only supported here and here.
PS If "facebook or twitter for example" are kind, they may display a readable form to their users, so don't worry about giving an encoded form.
Create a bookmark with this url: javascript:console.log(prompt('copy (Control+C) this link:', decodeURIComponent(window.location)))
.
Click this bookmark on that page.
You can select URL without selecting scheme (e.g. http://
), and copy it. This will give you what you expected.
P.S. The point is to select only part of the link. E.g. you can select whole URL without first character and than add it manually.
You can use Chrome Extensions like below:
https://chrome.google.com/webstore/detail/copy-unicode-urls/fnbbfiapefhkicjhecnoepbijhanpkjp
https://chrome.google.com/webstore/detail/copy-cyrilic-urls/alnknpnpinldhpkjkgobkalmoaeolhnf