Index: trunk/src/org/openstreetmap/josm/tools/Tag2Link.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 17735)
+++ trunk/src/org/openstreetmap/josm/tools/Tag2Link.java	(revision 17736)
@@ -27,4 +27,5 @@
 import javax.json.JsonValue;
 
+import com.google.gdata.util.common.base.PercentEscaper;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.OsmUtils;
@@ -202,9 +203,9 @@
         if (key.matches("wikimedia_commons|image") && value.matches("(?i:File):.*")) {
             OsmUtils.splitMultipleValues(value).forEach(i -> linkConsumer.acceptLink(
-                    tr("View image on Wikimedia Commons"), "https://commons.wikimedia.org/wiki/" + i, imageResource.get()));
+                    tr("View image on Wikimedia Commons"), getWikimediaCommonsUrl(i), imageResource.get()));
         }
         if (key.matches("wikimedia_commons|image") && value.matches("(?i:Category):.*")) {
             OsmUtils.splitMultipleValues(value).forEach(i -> linkConsumer.acceptLink(
-                    tr("View category on Wikimedia Commons"), "https://commons.wikimedia.org/wiki/" + i, imageResource.get()));
+                    tr("View category on Wikimedia Commons"), getWikimediaCommonsUrl(i), imageResource.get()));
         }
 
@@ -216,4 +217,8 @@
     }
 
+    private static String getWikimediaCommonsUrl(String i) {
+        return "https://commons.wikimedia.org/wiki/" + new PercentEscaper(PercentEscaper.SAFEPATHCHARS_URLENCODER, false).escape(i);
+    }
+
     private static String getLinkName(String url, String fallback) {
         return tr("Open {0}", getHost(url, fallback));
Index: trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 17735)
+++ trunk/test/unit/org/openstreetmap/josm/tools/Tag2LinkTest.java	(revision 17736)
@@ -87,5 +87,5 @@
     void testImageCommonsImage() {
         Tag2Link.getLinksForTag("image", "File:Witten Brücke Gasstraße.jpg", this::addLink);
-        checkLinks("View image on Wikimedia Commons // https://commons.wikimedia.org/wiki/File:Witten Brücke Gasstraße.jpg");
+        checkLinks("View image on Wikimedia Commons // https://commons.wikimedia.org/wiki/File:Witten%20Br%C3%BCcke%20Gasstra%C3%9Fe.jpg");
         links.clear();
         // non-regression test for #19754
@@ -93,4 +93,10 @@
         checkLinks("View image on Wikimedia Commons // https://commons.wikimedia.org/wiki/File:Foo.jpg",
                 "View image on Wikimedia Commons // https://commons.wikimedia.org/wiki/File:Bar.jpg");
+        links.clear();
+        // non-regression test for #19771
+        Tag2Link.getLinksForTag("image", "File:Côte de granite rose - Trégastel à Ploumanac'h - 20190723 - 025.jpg", this::addLink);
+        checkLinks("View image on Wikimedia Commons // " +
+                "https://commons.wikimedia.org/wiki/" +
+                "File:C%C3%B4te%20de%20granite%20rose%20-%20Tr%C3%A9gastel%20%C3%A0%20Ploumanac'h%20-%2020190723%20-%20025.jpg");
     }
 
