SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict TegSkywalker's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What should I use? CR LF, CR, or LF

    Today I was looking through my Dreamweaver settings and noticed these things in the Prefernces for Line Breaks:

    CR LF = Windows
    CR = Macintosh
    LF = UNIX

    By default, if you use the Windows version of Dreamweaver/UltraDev, it sets your line breaks to CR LF and if you use the Mac OS9/OSX version of it, it sets it to CR.

    In my development enviroment, we have people here who use both Mac and PC versions of Dreamweaver for HTML and PHP coding. I am just curious.. which one is the preferred Line Break method?

    The reason I ask this is because if I open up a web page created by the Mac version of Dreamweaver (or any text doc) with Notepad I get these block characters in my text. I am not sure if it can affect the way PHP acts in reading the code, but I want to be 100% sure that its safe.

    I mean.. I can set my Line Breaks to CR (Macintosh) in my Windows version of Dreamweaver and I may or may not set it to that to maintain compatiablity with the Mac people.

    Any suggestions? Thanks!

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my thought on this would be that it should be what's native to the server you're developing for. failing that, i'm fond of the unix convention (force of habit i guess).
    as far as opening with text application goes, i always keep PFE handy. i hear its development is now discontinued (crying shame) but it's really handy and can convert from dos/unix linebreaks in a click. not sure how it deals with mac files...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    SitePoint Addict TegSkywalker's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, all my servers are FreeBSD, but one of the things I always worry about is the fellow Mac guy is programming on OS X and he sometimes uses TextEdit for the coding. I know that works for Windows and Mac files, but not 100% sure how it would handle the LF encoded ones.

    CR and LF look the same (placement of the blocks and so on) in Notepad, but don't want to take any chances.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •