New lines in binary file.

I have a program that reads and writes data to binary a binary file. However when I open it up with a text editor I see one long line. However other binary files I run into have multiple lines, how can I split my data into lines?

What I have

^%%&^&*()*&$*&$(*& &%$(&$%)($^%*)($*^$ $(*^%$(*%$&%$(*%&$%$^%$^$#$%$%


What I want

^%%&^&*()*&$*&$(*& &%$(&$%)(
^%%&^&*$*^#$%()*&*& &%$(&$%)(*#(&^$#*(&$#
)_^)_&()$*%**(&(#$
Last edited on
It depends on what new line markers you have and what editor.

The standard windows notepad does not recognize the linux (\n) line endings.
Use e.g. notepad++ for this.
Well viewing my binary file on Notepad++, or Vim (Linux) is the same long line.
The newline characters are there, they just aren't read as newline characters by the program.

If you open the file as binary, and have your program display the text, you will see the newlines.
Topic archived. No new replies allowed.