35

Let's say I open a webpage with some Unicode characters, say, Cyrillic, in the address like this:

http://ru.wikipedia.org/wiki/Функциональная_закреплённость

When I try to copy it from the address bar somewhere else, it becomes unreadable rubbish:

http://ru.wikipedia.org/wiki/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D0%B7%D0%B0%D0%BA%D1%80%D0%B5%D0%BF%D0%BB%D1%91%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D1%8C

I guess this is for compatibility. However for readability I want to copy it straight away with proper Unicode characters.

What and how should I tweak to make that possible?

Edit: The answers are good, but they are hacky. Are there any settings in about:config?

  • 1
    From the multiple answers, the easiest way seems to be: Copy only a fragment of the URL, and more completely: Don't select the whole URL in the address bar, either exclude one character, or add one (e.g. a space at the end). Then add/remove this character after the paste. – mins Jul 20 '18 at 7:40
17

Try setting the network.standard-url.escape-utf8 option via about:config.

Possible values and their effects:

  • true - Escape UTF-8 URLs. (Default)
  • false - Do not escape UTF-8 URLs.
17

The setting was replaced with browser.urlbar.decodeURLsOnCopy in Firefox 53+.

  • 1
    It works only in url-bar, if I just copy link from web-page and past – I still get %-things. Does Firefox have addon like Chrome's? – stegetsj Feb 23 at 12:45
14

Yes, browsers do that -- it's URL encoding and actually a quite useful thing.

I see two choices

  1. Copy only a fragment of the URL, it will not be URL encoded.

  2. Decode the URL encoding. In Unix, you can open a terminal, and type

    echo -n -e "$(echo http://ru.wikipedia.org/wiki/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%DB0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D0%B7%D0%B0%D0%BA%D1%80%D0%B5%D0%BF%D0%BB%D1%91%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D1%8C | sed 's/+/ /g;s/%\(..\)/\\x\1/g;')"
    
  • 1
    This should be the default answer. – Jeanno Apr 20 '17 at 2:42
  • 1
    Your idea regarding copying a part of the URL is extremely helpful! (especially because on my FF v50.0, the about:config setting did not change anything). Regarding the second option you wrote, Is there a command for Windows users too? – spaceman Jul 1 '17 at 9:33
11

It's not rubbish, it's URL encoded. However here's the trick:
You can edit the URL in the address bar (by adding and then removing a character), and the copy-pasting should preserve the encoding.

  • Why the downvote? oO – m4573r Sep 28 '12 at 8:56
  • Interesting "trick". Seems to work in Firefox v.32, however unfortunately not in Chromium v.37 (~ Google Chrome). Or does it? – nutty about natty Sep 9 '14 at 13:28
  • @nuttyaboutnatty works for me in Chromium 76. – Ruslan Oct 15 at 13:32
3

Use this key sequence to copy UTF-8 URL:

Ctrl-L, Home(or End), Space(or a letter/symbol), Backspace, Ctrl-L, Ctrl-C
2
  1. Copy the URL from the address bar

  2. Paste it here.

  3. Press the Decode button.

  4. Copy the decoded URL and use it elsewhere.

  • 3
    Too complex to just copy the URL by Ctrl+L, Ctrl+C without touching the pointing device. – Aleksey F. Sep 9 '16 at 7:06
1

firefox quantum 62.0

about:config

browser.urlbar.decodeURLsOnCopy: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.