By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

carriage return in hex 0D

P: n/a

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.


Jan 15 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Patricia Smith wrote:
Does anyone know how to code in Java to pass a hex 0D?
(followup set to

From the Java Language Specification (JLS)

3.10.6 Escape Sequences for Character and String Literals
\ r /* \u000d: carriage return CR */

You want to send the '\r' character. Your encoding (ASCII, ISO-8859-1, UTF-8,
....) may matter.

- Lew
Jan 15 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.