Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to insert carriage return

 
sv.srikrishna kitti
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Program to convert ebcidc to unicode
I need to insert a carriage return after every bytes of data read.please tell me how this can be done.


 
Ireneusz Kordal
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carriage return has code 13 - see here: http://www.asciitable.com/
You may write it to the file with a command: fout.write( 13 );
 
sv.srikrishna kitti
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.Can i insert the same while reading bytes.
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ireneusz Kordal wrote:Carriage return has code 13 - see here: http://www.asciitable.com/
You may write it to the file with a command: fout.write( 13 );

Don't write 13. Write '\r'. It's the exact same value but easier to read.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic