private int ConvertToInt(String s)
{
UnicodeEncoding ue = new UnicodeEncoding(true, false);
byte[] b = ue.GetBytes(s);
int value = 0;
for (int i = 0; i < b.Length - 1; i++) {
value += b[i] & 0xff;
value <<= 8;
}
value += b[b.Length - 1] & 0xff;
return value;
}