Laravel URL 使用utf-8编码的路由

Laravel URL route with utf-8 encoding

我有一些页面 url 与维基百科非常相似:

http://uk.wikipedia.org/wiki/Київ

问题是当我调用 laravel route() 来获取 url

route('myRouteName', 'Київ');

我得到类似的东西:

http://uk.wikipedia.org/wiki/%D0%9A%D0%B8%D1%97%D0%B2

这是该参数的编码版本。

现在 Google 或任何其他 SE 将这两个 url 视为:

http://uk.wikipedia.org/wiki/%D0%9A%D0%B8%D1%97%D0%B2
http://uk.wikipedia.org/wiki/Київ

相同还是重复?

两个 URL-s 都可以在现代浏览器中工作,并且 Google 必须足够智能才能显示更好的 SEO 版本。维基百科显示 http://uk.wikipedia.org/wiki/Київ

这些链接与 Google 相同。这是来自 Google 的解释:https://support.google.com/webmasters/answer/35653?hl=en

Below is an example of a URL that uses a non-ASCII character (ü), as well as a character that requires entity escaping (&):

http://www.example.com/ümlat.html&q=name

Below is that same URL, ISO-8859-1 encoded (for hosting on a server that uses that encoding) and URL escaped:

http://www.example.com/%FCmlat.html&q=name