File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

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


Please help

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46320
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

Joined: Jul 11, 2001
Posts: 14112

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:
subject: how to display special characters
It's not a secret anymore!