我在Firefox(50.0.2)基本身份验证对话框中输入了用户名“süp€r”,结果是转移的标题Authorization: Basic c/xwrHI6
。
.NET 4.6.2提供的140种编码都不能将字节73 FC 70 AC 72 3A
解码为原始字符串:
var bytes = Convert.FromBase64String("c/xwrHI6").Dump();
var query=
from ei in Encoding.GetEncodings()
let e = ei.GetEncoding()
let s = e.GetString(bytes)
where s.Contains('€')
select new { e.CodePage, e.EncodingName, e.WebName, s };
new { bytes, R = query.ToList()}.Dump();