Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I print extended ascii characters in Java

 
Samuel Thomas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I would like to print extended ascii characters(characters between 127 and 255). Unfortunately I am not able to get the corresponding ascii character symbols for the following values 129,141,143,144,157. I am getting the correct values for all the other numbers,
except for these numbers where a ? is returned.
for( int i=127;i < 256;i++)
{
byte[] data = new byte[1];
data[0]= (byte)i;
System.out.println("The character " + new String(data));
}
Could any one tell me where I went wrong ?
Please do help me with an idea of getting the values for the missed numbers?
Thanking you in advance
Regards
Samuel
 
Rikard Qvarforth
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello i think theese numbers are plattfomr independent, and thats why the ? is insteed for the sign. I tried in command in nt with ALT+thenumber and it is � � etc..
maby ?? !!
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is also posted in Intermediate, I am closing it here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic