indexOf ist für Strings.
Lösung für's Ausgeben:
Zwei Arrays, wobei im einen die Dos Werte stehen, im anderen die Unicode (an den selben Postionen, also z.B. a[0]=Wert von ä in Dos, b[0]=Wert von ä in Unicode.
Vielleicht findest du bei Google eine bessere Methode, mir fällt im Moment nichts besseres ein.
Code:
static boolean isLetter(char ch){
int[] dosValues={132,142,148,...};
int[] unicodeValues={228,...};
int numVal=Character.getNumericValue(char ch);
boolean isDosChar;
char outputChar;
for (int i=0; i<dosValues.length;i++){
if(dosValues[i]==numVal){
isDosChar=true;
outputChar=unicodeValues[i];
System.out.println(outputChar);
break;
}
}
return isDosChar || Character.isLetter(char ch);
}
Jak
____________________________________
Join the DNRC |
Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)