http_proxy with special character in password

My new password at work has special characters.

To set up the proxy setting for some application, I use:

http_proxy=http://username:password@proxyname.com:8080

Many applications (I was trying to get Macports working) read the value of this variable and parse it according to delimiters ':' and '@'. So, if your username or password contain '@' or ':' , it will all go away. With other special characters, you can use '\' to escape characters. But not with '@' and ':' , the escape character doesn't work.
So, what's the solution?
Simply replace '@' with it's hexadecimal notation '%40', or ':' by '%3A'.

About the author

Consultant, Web strategist, and Drupal enthusiast, I use open source software to build application that connects people and spread ideas. I believe that internet can lead to powerful changes for progressive organizations, and for our future.

Keep in touch here