WordPress.org

Ready to get started?Download WordPress

Forums

Text File Line Ends UNIX vs. PC (2 posts)

  1. FSSBob
    Member
    Posted 1 year ago #

    I'm a new WordPress developer making some changes to an existing site. I set up a local development install using WAMPServer, and have made and tested some changes. But as I'm about to start updating files on the production site, I've run into the following concern:

    The production server is on a (GoDaddy) UNIX host. My assumption has been the text files (.php, .html, .css, etc.) there follow the UNIX convention for line ends. FileZilla, which I used to download the files to my WAMP Server setup, appears to make that assumption as well. By default, it converts the line ends for the filetypes it knows are text between UNIX format (a line feed only) and PC format (carriage return + line feed).

    But now I've discovered that some of the text files on the production site actually have PC-type line ends. When I downloaded them with FileZilla, they worked (with one exception), but were technically corrupt in that in they now had been "converted" to PC-type line ends a second time, and thus had an unnecessary second carriage return at the end of each line.

    I'm assuming that the host text files with PC-type line ends were there because someone in the past modified them on a PC and then erroneously used a binary FTP transfer to the host. Actually, I'm surprised they haven't created any problems.

    I just want to confirm: When I work with text files on a WordPress site: If it's on a UNIX host they need to follow UNIX line end conventions, and on a PC need to follow PC line end conventions. Is that correct? (That was the case when I used to deal with UNIX vs. PC text file issues many years ago, but maybe today things have changed and it no longer matters?)

    Thanks.

  2. Abhishek Ghosh
    Member
    Posted 1 year ago #

    The production server is on a (GoDaddy) UNIX host.

    UNIX or UNIX like (Linux) ? There are small differences as you know.

    My assumption has been the text files (.php, .html, .css, etc.) there follow the UNIX convention for line ends.

    Use Gedit for Windows as text editor in Windows PC. That will help a lot. You can open dot-files by drag and drop inside opened Gedit.
    AppleDouble might not open.

    http://projects.gnome.org/gedit/

    I just want to confirm: When I work with text files on a WordPress site: If it's on a UNIX host they need to follow UNIX line end conventions, and on a PC need to follow PC line end conventions. Is that correct?

    Yes. Notepad has not changed !

    That was the case when I used to deal with UNIX vs. PC text file issues many years ago, but maybe today things have changed and it no longer matters?

    Matters, Windows has remained more or less the same with change in GUI.

Topic Closed

This topic has been closed to new replies.

About this Topic