HEX (헥사) 값을 decode (디코딩) 하는 방법
private string Decode(string input)
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
int len = input.Length;
int i = 0;
int sIx = 0;
while (true)
{
if (input[i] == '%')
{
sb.Append(input.Substring(sIx, i - sIx));
string hc = input.Substring(i + 1, 2);
int hi = int.Parse(hc, System.Globalization.NumberStyles.HexNumber);
char c = (char)hi;
sb.Append(c);
sIx = i + 3;
i = i + 2;
}
i++;
if (i >= len)
{
sb.Append(input.Substring(sIx));
break;
}
}