wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes how to display special characters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

how to display special characters

priya pratheepp
Ranch Hand

Joined: Apr 02, 2008
Posts: 59
I am doing one program which read serial port data (for bar code reader) using java application.

My program is working well and reading serial data but it is not displaying special characters.When i read through hyperterminal i can see all special characters but when see data throught the output of java program these special characters are missing...

I don't know i am doing something wrong in stream or ???

My code is

code:
--------------------------------------------------------------------------------





Please help

thanks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38519
    
  23
Please make sure to put newline or enter when you are quoting code, otherwise it can get hard to read.

Different fonts vary in which characters they can display; try this Wikipedia page. Whichever font is used on the Windows command prompt has a very restricted range of characters, so even � won't display correctly, whilst the shells on Linux desktops will display all sorts of odd characters. So check which font and display you are using first.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
See http://www.coderanch.com/t/385391/java/java/serial-port-reading


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to display special characters