31 August 2012

Proxy Password with Exotic Characters

I recently changed my proxy password. Soon afterwards I found that I was getting errors like

Error parsing proxy URL

from dpkg. After doing a little bit of research I concluded that this was because I had some "exotic" characters in my password. To be more specific, my password was "xxxxx#xxx". So simply doing something like

export http_proxy=http://username:xxxxx#xxx@proxy:port

did not work. To get this to work you need to find the hexadecimal ASCII code the the character concerned and use this rather than the character itself. The solution:

export http_proxy=http://username:xxxxx%23xxx@proxy:port

You can find the ASCII codes in any of a number of places, for example here.

No comments:

Post a Comment