public static string Encodeing(string input)
{
char[] values = input.ToCharArray();
byte[] bvalues = Encoding.Default.GetBytes(values);
string sResult = "";
int nLoop = 0;
string hex = "0123456789ABCDEF";
while (nLoop < bvalues.Length)
{
byte abyte = bvalues[nLoop];
if (abyte < 127 && abyte > 0)
{//
sResult += '0';
sResult += '0';
sResult += hex[(abyte >> 4) & 0x0f];
sResult += hex[abyte & 0x0f];
nLoop++;
}
else
{//
sResult += hex[(abyte >> 4) & 0x0f];
sResult += hex[abyte & 0x0f];
nLoop++;
if (nLoop == bvalues.Length) break;
abyte = bvalues[nLoop];
sResult += hex[(abyte >> 4) & 0x0f];
sResult += hex[abyte & 0x0f];
nLoop++;
}
}
return sResult;
}