GHC 2018-04-10

9 comments.

, https://git.io/vxFf6 in moretension/duti
> forks don't have a Issues tab

That's false. It's just disabled by default, and can be enabled with a click in settings.

, https://git.io/vxdcb in jarun/googler
Side note: You don't really need `-v`, `-D-` will give you the response headers; or if you don't care about the response body, a HEAD request with `-I` will do.

, https://git.io/vxdcN in jarun/googler
Yeah, Content-Type could specify the charset too. My bad.

, https://git.io/vxdZ1 in jarun/googler
No, HTTP’s concept of enconding is entirely different and mostly about compression, e.g. gzip, deflate, or identity. Text encoding is not part of the protocol. HTML uses meta charter and even that is optional. Since we’re not dealing with HTML here, there’s nothing like the meta tag. HTTP text encoding is a guessing game all along, but with a library like chardet it’s guessed correctly almost 100% of the time.

, https://git.io/vxdZM in jarun/googler
Returning JSON as Latin-1 is really hostile. We can't add chardet, but we can use Latin-1 as fallback .

, https://git.io/vxdZD in jarun/googler
That's an already decoded version. Maybe use `xxd` to find your `0xe7`:

```
curl -s -A 'Python-urllib/3.6' 'https://www.google.com/complete/search?client=psy-ab&q=hello%20w' | xxd
```

Pay special attention to byte number 333.

, https://git.io/vxdZy in jarun/googler
Still, the response should not be non-UTF-8. Please upload the exact content of `https://www.google.com/complete/search?client=psy-ab&q=hello%20` that you get.

, https://git.io/vxdZS in jarun/googler
There you go, the response for `https://www.google.com/complete/search?client=psy-ab&q=hello` is non-UTF-8 for whatever reason.

, https://git.io/vxdZ9 in jarun/googler
```
googler --debug --complete hello
```