Fixed bug with non-ASCII characters being URL-encoded.
Fixed #558 by implementing RFC2231.