Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

carriage return in hex 0D

Thread view: 
Patricia Smith - 15 Jan 2007 16:46 GMT
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
Lew - 15 Jan 2007 17:28 GMT
> Does anyone know how to code in Java to pass a hex 0D?

(followup set to clj.help)

From the Java Language Specification (JLS)
<http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#101089>:

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

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

- Lew


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.