• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I print extended ascii characters in Java

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?? !!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this is also posted in Intermediate, I am closing it here.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic