Olá a todos,
Estou com o seguinte problema: como posso fazer com que o Eclipse utilize a tabela ASCII Latin-1 conforme este site
http://mindprod.com/jgloss/ascii.html, pois o código abaixo funciona perfeitamente no Netbeans, porém no Eclipse não ele esta usando outra tabela ASCII. Ex: onde o caracter que se refere ao número decimal 146, no eclipse ele se refere ao número 8217
Como posso resolver isso?
segue Código
public static String criptKey = "ad@58$49*¨%s#ys";
private static String parametro= "123456";
public static void main(String[] args) {
int j = 0;
String parametroConvertido = "";
if (parametro.length() > 0) {
for (int i = 0; i < parametro.length(); ++i) {
int chrSenhaValue = parametro.charAt(i);
int chrKeyValue = criptKey.charAt(j);
char chrSenhaOk = (char) ((256 + chrSenhaValue + chrKeyValue) % 256);
parametroConvertido += chrSenhaOk;
if (j == (criptKey.length() - 1)) {
j = 0;
} else {
j = (j % (criptKey.length() - 1)) + 1;
}
}
parametro = parametroConvertido;
}
System.out.println(parametro);
}
Obrigado