Re: [whatwg/url] Need an "unreserved" character set (and better define how to percent-encode arbitrary strings) (#369)

Just trying a couple, JS seems very much in the minority here...

Python:

``` python
>>> urllib.parse.quote("!'()*")
'%21%27%28%29%2A'
```

PHP:

``` php
urlencode("!'()*");
=> "%21%27%28%29%2A"
```

Perl:

``` perl
use URI::Escape;
print(uri_escape("!'()*"));
%21%27%28%29%2A
```

Ruby:

``` ruby
require "erb"
include ERB::Util
puts url_encode("!'()*")
%21%27%28%29%2A
```

Go: 
``` go
package main

import (
 "fmt";
 "net/url";
)

func main() {
 fmt.Println(url.PathEscape("!'()*"))
}

%21%27%28%29%2A

Program exited.
```

Java:

``` java
import java.net.URLEncoder
String e = URLEncoder.encode("!'()*", "UTF-8")
System.out.println(e)

%21%27%28%29*
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/369#issuecomment-380676676

Received on Thursday, 12 April 2018 04:46:30 UTC