/ **
* Convert to UTF8 code
* @Param s
* @Return
* /
Public static string toutf8string (string s) {
StringBuffer SB = new stringbuffer ();
For (int i = 0; i
CHAR C = S.Charat (i);
IF (c> = 0 && c <= 255) {
Sb.append (c);
} else {
Byte [] B;
Try {
B = String.Valueof (c) .getbytes ("UTF-8");
} catch (exception ex) {
System.out.println (ex);
B = new byte [0];
}
For (int J = 0; j
INT K = B [J];
IF (k <0)
K = 256;
sb.append ("%" integer.tohexstring (k) .touppercase ());
}
}
}
Return sb.toString ();
}