Professional Web Applications Themes

Line Feed vs Carriage Return - Microsoft SQL / MS SQL Server

"Lynn" <noemail> wrote in message news:011901c34717$b9a7d5f0$a601280aphx.gbl... > What is the difference between a line feed char(10) and a > carriage return char(13) as far as when you use one vs the > other or a combination of both. > > char(10) is the line delimiter on Unix. char(13) + char(10) is the line delimiter on Windows. David...

  1. #1

    Default Re: Line Feed vs Carriage Return

    "Lynn" <noemail> wrote in message
    news:011901c34717$b9a7d5f0$a601280aphx.gbl...
    > What is the difference between a line feed char(10) and a
    > carriage return char(13) as far as when you use one vs the
    > other or a combination of both.
    >
    >
    char(10) is the line delimiter on Unix.
    char(13) + char(10) is the line delimiter on Windows.


    David


    David Browne Guest

  2. #2

    Default Re: Line Feed vs Carriage Return

    I always use CHAR(13) + CHAR(10) to prevent weird and unpredictable results
    when the text is used in other applications.

    I also always work in Windows. :-)





    "Lynn" <noemail> wrote in message
    news:011901c34717$b9a7d5f0$a601280aphx.gbl...
    > What is the difference between a line feed char(10) and a
    > carriage return char(13) as far as when you use one vs the
    > other or a combination of both.
    >
    >

    Aaron Bertrand - MVP Guest

  3. #3

    Default Re: Line Feed vs Carriage Return


    Have a look at the following url for a good explanation of the ASCII character set.
    Of particular interes for you is the section on Control Chrarcters

    [url]http://www.jimprice.com/jim-asc.htm[/url]


    "Lynn" <noemail> wrote in message news:011901c34717$b9a7d5f0$a601280aphx.gbl...
    What is the difference between a line feed char(10) and a
    carriage return char(13) as far as when you use one vs the
    other or a combination of both.



    Damien Laffan Guest

  4. #4

    Default Re: Line Feed vs Carriage Return

    To add to what Aaron said, if you are working in a .NET programming
    environment, make sure you use Environment.NewLine which automatically
    configures itself for the platform you are running on.

    HTH,

    --
    Greg Low (MVP)
    MSDE Manager SQL Tools
    [url]www.whitebearconsulting.com[/url]

    "Aaron Bertrand - MVP" <aaronTRASHaspfaq.com> wrote in message
    news:u7a82uxRDHA.2148TK2MSFTNGP12.phx.gbl...
    > I always use CHAR(13) + CHAR(10) to prevent weird and unpredictable
    results
    > when the text is used in other applications.
    >
    > I also always work in Windows. :-)
    >
    >
    >
    >
    >
    > "Lynn" <noemail> wrote in message
    > news:011901c34717$b9a7d5f0$a601280aphx.gbl...
    > > What is the difference between a line feed char(10) and a
    > > carriage return char(13) as far as when you use one vs the
    > > other or a combination of both.
    > >
    > >
    >
    >

    Greg Low \(MVP\) Guest

Similar Threads

  1. Create RTF / Word Docs - Line Feed / Carriage Return
    By Mattsala in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: June 28th, 09:04 PM
  2. Carriage Return
    By Barnabas (Barney) Yohannes in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: March 4th, 08:12 PM
  3. FTP doesn't add Carriage Return from VMS to NT?
    By Mike O'Neal in forum PERL Miscellaneous
    Replies: 6
    Last Post: August 12th, 07:37 PM
  4. Replies: 1
    Last Post: July 31st, 12:16 PM
  5. Carriage Return / Line Feed question
    By Chris Kolosiwsky in forum PERL Miscellaneous
    Replies: 3
    Last Post: July 13th, 04:05 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139