my dog learned polymorphism*
The moose likes Beginning Java and the fly likes How do I print extended ascii characters in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I print extended ascii characters in Java " Watch "How do I print extended ascii characters in Java " New topic
Author

How do I print extended ascii characters in Java

Samuel Thomas
Greenhorn

Joined: Nov 08, 2000
Posts: 4
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

Joined: Jul 10, 2001
Posts: 107
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

Joined: Sep 29, 2000
Posts: 8521
Since this is also posted in Intermediate, I am closing it here.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I print extended ascii characters in Java
 
Similar Threads
How do I print extended ascii characters in Java
binary files and char []
doubt on char assignment
How to Return Extended ASCII Decimal Code
Strange Characters in TextPanes...