CRLF or LF when packaging plugins? (4 posts)

  1. riddle
    Posted 10 years ago #

    I've got a brand-spanking new plugin ready to go (watch this space for an announcement) and I've had an early tester complain because the README.txt file used Unix/Mac-style LF (\n) instead of Windows-style CRLF (\r\n).

    I'd have thought that when you double-clicked on a README.txt files in Windows the viewer would be smart enough to display a Unix text file correctly. I guess I thought wrong.

    Looking around, I see WordPress plugins packaged up both ways. Should I repress my Unix/Mac snobbery and reformat my files with CRLF? Does that apply to the PHP files or only to the .txt files?

    And are there any other gotchas I might run into when creating zipfiles on a Unix or Mac OS X box?

  2. geetarista
    Posted 10 years ago #

    I have no idea, but I love the blog name!

  3. riddle
    Posted 10 years ago #

    In my long tradition of posting questions and then answering them myself: :-)

    A friend pointed out that WP itself is distributed in CRLF (\r\n) style so for consistency, plugins should do the same.

    I'll grit my teeth and Redmondize the line breaks in my plugin. Sigh.

    I'd still welcome suggestions about other mistakes I should avoid when packaging the plugin.

  4. moshu
    Posted 10 years ago #

    Should I repress my Unix/Mac snobbery?

    Yep :) the majority of the users have pc/win. If you make a plugin for general public - always keep that in mind.

Topic Closed

This topic has been closed to new replies.

About this Topic