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]
Joined: Jul 11, 2001
The String constructor you are using expects the bytes to be in the platforms default encoding. If the application on the other end uses a different encoding, you need to specify it by using the constructor that allows the specify the encoding to use.
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