41

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?

2

7 Answers 7

30

The setting was replaced with browser.urlbar.decodeURLsOnCopy in Firefox 53+. Set it to true.

For copying in Firefox on Android see https://android.stackexchange.com/q/224951/17612

2
  • 4
    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, 2019 at 12:45
  • @stegetsj I'm not aware of such extension, unfortunately. I don't think I'll use it but if you find one and post it as a separate answer I'll definitely upvote it.
    – int_ua
    May 13, 2020 at 5:50
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.
8
  • 6
    Doesn't seem to be working anymore. I'm using FF28. The option is there but it gives no effect.
    – Adobe
    Jul 11, 2014 at 12:20
  • For the record for future visitors, setting network.standard-url.escape-utf8 to false does seem to work as of FF40.
    – Sundar R
    Aug 29, 2015 at 19:50
  • This was the default on some version, but was changed because it breaks some websites: bugzilla.mozilla.org/show_bug.cgi?id=552273 Oct 7, 2015 at 4:58
  • Works fine in FF 45.
    – Aleksey K
    Mar 29, 2016 at 22:02
  • 6
    The setting's name was changed, see this answer. Dec 17, 2017 at 19:57
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;')"
    
2
  • 1
    This should be the default answer.
    – Jeanno
    Apr 20, 2017 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, 2017 at 9:33
13

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.

3
  • Why the downvote? oO
    – m4573r
    Sep 28, 2012 at 8:56
  • Interesting "trick". Seems to work in Firefox v.32, however unfortunately not in Chromium v.37 (~ Google Chrome). Or does it? Sep 9, 2014 at 13:28
  • @nuttyaboutnatty works for me in Chromium 76.
    – Ruslan
    Oct 15, 2019 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
1
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.

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

firefox quantum 62.0

about:config

browser.urlbar.decodeURLsOnCopy: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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