carriage return in hex 0D

P

Patricia Smith

Hi,

I need some help in writing Java code in representing carriage returns
in Hex 0D. I've written a program in Java on an Unix system that
passes data to a Stratus machine via TCP/IP socket. The data I send to
the Stratus box needs to have carriage returns in it, which I've
written in Java as "\r", but the Stratus box does not seem to
recognize it. It is expecting a hex 0D instead.

Does anyone know how to code in Java to pass a hex 0D?

Thanks in advance for any advice you can provide.

Pat
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Patricia said:
I need some help in writing Java code in representing carriage returns
in Hex 0D. I've written a program in Java on an Unix system that
passes data to a Stratus machine via TCP/IP socket. The data I send to
the Stratus box needs to have carriage returns in it, which I've
written in Java as "\r", but the Stratus box does not seem to
recognize it. It is expecting a hex 0D instead.

Does anyone know how to code in Java to pass a hex 0D?

[why not limit the number of newsgroups you post to a bit ?]

\r is a CR (hex 0D).

The syntax for using hex in strings are

"xx\u000Dxx"

but "xx\rxx" should do the same.

Can you post a little code snippet on how you setup
the string and write it to the socket ?

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top