# url encoding rfc 3986 conformance

- Thread: https://externals.io/message/37603
- Original archive: https://news-web.php.net/php.internals/37603
- Started by Rob Richards on 2008-05-12T11:15:32+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #37603 — Rob Richards — 2008-05-12T11:15:32+00:00

URL: https://externals.io/message/37603#37603

I'd like to update, or at a minimum, add an option for rawurlencode to 
output rfc3986 conforming data.
It basically boils down to just also not encoding the "~" character.

Most of the new technologies doing encoding require this and its 
becoming a pita to write exception code for that one character.

Personally I think the function should just be updated for 3986 
compliance rather than adding any parameter flags.
simple change in url.c
-                       (str[y] > 'z')) {
+                       (str[y] > 'z' && str[y] != '~')) {

possibly updating urlencode as well to keep them working similarly

Rob
