42

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?

Mirzhan Irkegulov
  • 1,384
  • 1
  • 12
  • 31
  • 1
    From the multiple answers, the [easiest way](https://superuser.com/a/480697/89738) 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 07:40
  • related: https://stackoverflow.com/questions/18176661/copying-a-utf-8-url-from-browsers-address-bar-gives-only-the-ugly-encoded-one – Ciro Santilli OurBigBook.com Feb 01 '20 at 01:23

7 Answers7

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

int_ua
  • 312
  • 3
  • 12
  • 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](https://chrome.google.com/webstore/detail/copy-unicode-urls/fnbbfiapefhkicjhecnoepbijhanpkjp)? – Sutnôstj Feb 23 '19 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 '20 at 05: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.
sergtk
  • 490
  • 3
  • 8
  • 22
user201919
  • 171
  • 1
  • 2
15

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;')"
    
January
  • 271
  • 1
  • 9
  • 1
    This should be the default answer. – Jeanno Apr 20 '17 at 02: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 01 '17 at 09: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.

m4573r
  • 5,561
  • 1
  • 25
  • 37
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
julthep
  • 31
  • 3
2

firefox quantum 62.0

about:config

browser.urlbar.decodeURLsOnCopy: true
illucent
  • 31
  • 3
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.

Karan
  • 55,947
  • 20
  • 119
  • 191