Hey folks,
Any ideas on how to display the '£' symbol in java run screen?
e.g. I have: screen.println("Total price is £ " + cost);
Thanks.
Printable View
Hey folks,
Any ideas on how to display the '£' symbol in java run screen?
e.g. I have: screen.println("Total price is £ " + cost);
Thanks.
Since DOS uses ASCII i doubt you will be able to print any unicode chracters.
While DOS does extend the ASCII set beyond 128(which is technically ISO Latin-1) ie.....Code:class C {
public static void main(String args[]){
char c = '\u00a3'; // pound sign '\u20a4' Lira
System.out.print(c);
}
}
128 - 255(Special symbols, international character sets - generally these are non-standard characters) anything past 255 will just print out question marks.
Code:class C {
public static void main(String args[]){
for(int i = 128; i < 256; ++i){
System.out.print((char) i);
}
}
}
Once again we see that anything that falls out of the range of 0 to 28 - 1(0 - 255) will print ? marks.
Code:class C {
public static void main(String args[]){
char c = '\u005a'; // 90(Z)
System.out.println(c);
char d = '\u013c'; // 400(?)
System.out.println(d);
}
}