encode the URL

following the recommendation of the W3C page, encode the URI in the
header as well.

http://www.w3.org/International/articles/idn-and-iri/