The url can contain characters that need encoding

This story triggered a UnicodeEncodeError:
https://news.ycombinator.com/item?id=8087871