Part of the messyness of URLs might stem from the fact that they occur in a lot of different contexts, with very different properties and reserved characters:<p>- Somewhere within some unstructured text: Here, finding the exact end of the URL is difficult and disallowing spaces can have a great benefit. Even then you can have ambiguities: Does punctuation at the end belong to the URL? What about URLs that are wrapped in &lt;&gt; brackets?<p>Whether or not it&#x27;s even possible that the URL contains non-ascii chars depends on the type of the document.<p>- As a value of a HTML attribute without surrounding quotes: Slightly less ambiguous but including a space would break the HTML parser. The parser works fine with unicode characters however, so there is less pressure for authors to encode them.<p>- As a value of a quoted HTML or XML attribute, HTTP header or data field: Charset, Start and end of the URL are communicated out-of-band so there is no pressure at all to normalize the URL.<p>- In the browser address bar: Start and end are unambiguous but there are other concerns: You have to detect if it&#x27;s an actual URL or a search term, you have to deal with omitted parts (e.g. no scheme) and people WILL input unicode characters. You also want to display unicode characters to the user, except when you don&#x27;t want to for security reasons. And then users will copy the URL in the address bar and paste them into an HTML document...