I am unable to convert extended ASCII characters(having code greater than 128) into their codes.
I am using (int)'�' for conversion but its is giving
� -- 65533
I am using the following java function:
static String decodeCandidateId2(String CandidateId ){
byte[] valueDecoded= Base64.decodeBase64(CandidateId.getBytes());
CandidateId=new String(valueDecoded);
String key="@!#&%$#@&^%$";
String output="";
for(int i=0; i<CandidateId.length(); i++) {
int ascii=0;
ascii=(int)CandidateId.charAt(i)-((int)key.charAt((i-1) % key.length()));
output += Character.toString ((char) ascii);
}
return output;
}
if CandidateId = "VXJaWl9lVlV0XpRbZHVZWFpeXVuAV5NVW3BRW19XVQ==" current output = 12979@2248゚6@5854998ᄑ1゚07008921, but i need to get 12979@224866@5854998@1507008921 as output.
Can anyone please help me to get the correct code.
Character.toString( (char) 65533 );?-encodingswitch, if any? Note: there is no such thing as an ASCII character with a code point of 128 or higher. ASCII is a seven bit encoding.