What encoding should I use for HTTP Basic Authentication?
The RFC2617 says to encode the username and password to base64 but don't say what character encoding to use when creating the octets for input into the base64 algorithm. Should I assume US-ASCII or UTF8? Or has someone settled this question somewhere already? Original spec - RFC 2617 RFC 2617 can be read as "ISO-8859-1" or "undefined". Your choice. It's known that many servers use ISO-8859-1 (like it or not) and will fail when you send something else. So probably the only safe choice is to stick to ASCII. For more information and a proposal to fix the situation, see the draft "An Encoding