Copying a UTF-8 URL from browser's address bar, gives only the ugly encoded one

瘦欲@ 提交于 2019-12-02 14:50:50

You can add 'space' at the end of URL in address bar, then you can select it all and copy it directly.

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.

Or just insert space at the end of the URL as @mementototem suggested.

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 :)

Julien Palard

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!