Skip to content

Commit 3d89c0e

Browse files
authored
doc: improving the WHATWG URL documentation. (#515)
1 parent ca716d4 commit 3d89c0e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ The Ada library passes the full range of tests from the specification,
1414
across a wide range of platforms (e.g., Windows, Linux, macOS). It fully
1515
supports the relevant [Unicode Technical Standard](https://www.unicode.org/reports/tr46/#ToUnicode).
1616

17+
A common use of a URL parser is to take a URL string and normalize it.
18+
The WHATWG URL specification has been adopted by most browsers. Other tools, such as curl and many
19+
standard libraries, follow the RFC 3986. The following table illustrates possible differences in practice
20+
(encoding of the host, encoding of the path):
21+
22+
| string source | string value |
23+
|:--------------|:--------------|
24+
| input string | https://www.7‑Eleven.com/Home/Privacy/Montréal |
25+
| ada's normalized string | https://www.xn--7eleven-506c.com/Home/Privacy/Montr%C3%A9al |
26+
| curl 7.87 | (returns the original unchanged) |
27+
1728
### Requirements
1829

1930
The project is otherwise self-contained and it has no dependency.

0 commit comments

Comments
 (0)