1

If you want to copy Unicode characters from address bar as they are you should set this item in about:config to true: browser.urlbar.decodeURLsOnCopy. But the problem is that Firefox doesn't show Unicode characters in their original form when reading a web page in Reader View. So if I copy the URL from Reader View I'll end up with something like this:
https://fa.wikipedia.org/wiki/%DB%8C%D9%88%D9%86%DB%8C%E2%80%8C%DA%A9%D8%AF rather than this:
https://fa.wikipedia.org/wiki/یونی‌کد
Is there a workaround for that?

enter image description here

1 Answer 1

0

Workaround; two aliases in bash:

$ alias -p
...
alias urldecode='python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.argv[1]))"'
alias urlencode='python3 -c "import sys; from urllib.parse import quote; print(quote(sys.argv[1]))"'

$ urldecode https://fa.wikipedia.org/wiki/%DB%8C%D9%88%D9%86%DB%8C%E2%80%8C%DA%A9%D8%AF
https://fa.wikipedia.org/wiki/یونی‌کد

$ urlencode https://fa.wikipedia.org/wiki/یونی‌کد
https%3A//fa.wikipedia.org/wiki/%DB%8C%D9%88%D9%86%DB%8C%E2%80%8C%DA%A9%D8%AF

3
  • More complex converters: stackoverflow.com/questions/300445/…
    – Hannu
    Commented Mar 13, 2021 at 6:09
  • Thanks but I'm not familiar with bash aliases. Please explain how to do that. BTW, I'm on windows 8.1
    – dashakol
    Commented May 3, 2021 at 7:01
  • Three ways: install www.cygwin.com, run/install a pure Linux, and then: use WSL - aliases can then be set in a text-file named .bash_aliases in the home folder. The aliases then get initialized as you open a Terminal (most often a Bash-based command line).
    – Hannu
    Commented May 3, 2021 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .