Notepad losing line breaks when opening files

Discussion in 'Programming' started by Sn@Ke, Aug 21, 2010.

  1. #1
    Ok

    So I have this problem that is really annoying, when I work on a .php file with a friend notepad will show the file perfect with all the tabs and line breaks and nice format. But when I open the same .php file in wordpad it's all on one line with no line breaks which makes it really hard to edit, the same file if I open using notepad++ displays correctly but has a line break every second line.

    Why does this happen? I would like to use notepad++ without this happening, I don't like to use notepad.

    Image link to explain better:
    http://img828.imageshack.us/img828/5986/44547998.jpg


    EDIT:
    The file was created in notepad++

    The only program that displayed it correctly was notepad, so I saved changes in notepad and now its one line in all programs......
     
    Last edited: Aug 21, 2010
    Sn@Ke, Aug 21, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    Probably a problem with encoding. Try to save it as UTF-8 in Notepad and see if there's any difference.
     
    Rainulf, Aug 21, 2010 IP
  3. QiSoftware

    QiSoftware Well-Known Member

    Messages:
    805
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    158
    #3
    Or you can open the document in WordPad.

    Q...
     
    QiSoftware, Aug 21, 2010 IP
  4. uabclst

    uabclst Greenhorn

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    I would open the document in a hex editor. Then you'll see exactly what formatting is used. You can probably find a free hex-editor just googling for it.
     
    uabclst, Aug 22, 2010 IP
  5. Kaizoku

    Kaizoku Well-Known Member

    Messages:
    1,261
    Likes Received:
    20
    Best Answers:
    1
    Trophy Points:
    105
    #5
    It's probably from a unix system, they use \n as a new line. windows uses \r\n And notepad is primitive to detect that.
     
    Kaizoku, Aug 25, 2010 IP