CopyingInternationalURLs

Summary: Some hints and tricks to copy URLs with international (UTF-8) characters
Version: new
Prerequisites:
Status:
Maintainer: HansB
License: (Apache 2.0|BSD-3-clause|BSD-2-clause|GPL|LGPL|MIT|MPL-2.0|CDDL-1.0|EPL-1.0) - OpenSourceLicenses Cookbook:Cookbook Licenses
Users: (view? / edit)

Questions answered by this recipe

How can I copy an URL which contains international non-ASCII characters in the address bar?

Usage

On international web sites the address bar of your browser may show international non-ASCII characters. Because non-ASCII characters are not permitted in URLs, these characters are most likely url-encoded UTF-8 characters, and the browser decodes these to display them readable. If you now copy such a URL from the browser's address bar to your wiki page (insert into the edit text form), you most likely see the url-encoded URL,,with lots of %nn . Although this is functional and correct, it is not pretty and may not be what you want.

Here are some tips to copy the address without the url-encoding:

  1. Copy the address with a space added: Put cursor in address bar, on keyboard press Right Arrow, Space, Ctrl + A (to highlight all) and Ctrl + C (to copy). Then paste into the text form field. By changing the URL string the browser will not encode it.
  2. Copy just part of the URL, for instance leaving out the https://
  3. Configuring the browser so it will decode the URL.
    1. For Firefox you can do this: Type about:config in address bar, search for urlbar, toggle value of browser.urlbar.decodeURLsOnCopy to True

Example, from same site, both will form correct links:
URL copied as-is (url-encoded):

https://ja.wikipedia.org/wiki/%e3%82%b8%e3%83%a3%e3%82%a4%e3%82%a2%e3%83%b3%e3%83%88%e3%83%91%e3%83%b3%e3%83%80

URL copied decoded:

https://ja.wikipedia.org/wiki/ジャイアントパンダ

Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Contributors

HansB

Comments

See discussion at CopyingInternationalURLs-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.