473,911 Members | 5,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is CRLF?



What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
12 41445
Carriage return / line feed. char(13) + char(10).
"eddie wang" <ew***@kmg.co m> wrote in message
news:en******** ******@TK2MSFTN GP11.phx.gbl...


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
"eddie wang" wrote...
What is CRLF? Thanks.


CRLF = Carriage Return Line Feed

Effectively hitting the return key twice, thus leaving an empty line between
text.

You can use it in ASP with vbScript like so :

<%
strText = "This is my first sentance" & vbCRLF
strText = strText & "This is my second sentance"

Response.Write strText
%>

Hope this helps,

Regards

Rob
Jul 19 '05 #3
Carriage Return + Line Feed

Ray at work

"eddie wang" <ew***@kmg.co m> wrote in message
news:en******** ******@TK2MSFTN GP11.phx.gbl...


What is CRLF? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4
Rob Meade wrote on 03 mrt 2004 in
microsoft.publi c.inetserver.as p.general:
CRLF = Carriage Return Line Feed

Effectively hitting the return key twice, thus leaving an empty line
between text.


Nonsense. only 1.

The old teletype apparatus had seperate "characters " for the linefeed
[=advancing the paper roller 1 row] and the carriage return [=sending the
carriage with all the letter hammers back to the first position]

The order of first Cr and then Lf was extremely important, because the
time it took to return was covered by the Lf time [ 5+2 bits at 45.45
baud.]
If they were reversed the first letter of the next line was printed
somewhere in the middle of the line and subsequent letters as a line over
it.

Some operating system definitions [like Windows?] still define the
combination as the new paragraph signal in ascii text. Others [Linux,
Unix, Amiga] only use the Lf.

VBscript has all 3 defined as constants:

VbCr = ascii decimal 13 = hex 0C
VbLf = ascii decimal 10 = hex 0A
VbCrLf = VbCr & VbLf

But I repeat, only 1 touch of the <return> key is necessary.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5
"Rob Meade" <ro********@N O-SPAM.kingswoodw eb.net> wrote in message
news:Ye******** **************@ news-text.cableinet. net...
"eddie wang" wrote...
What is CRLF? Thanks.
CRLF = Carriage Return Line Feed

Effectively hitting the return key twice, thus leaving an empty line

between text.

Wrong. Effectively hitting the return key once, thus leaving no empty line
between text.

You can use it in ASP with vbScript like so :

<%
strText = "This is my first sentance" & vbCRLF
strText = strText & "This is my second sentance"

Response.Write strText
%>

The result of the above would look something like this:
This is my first sentance
This is my second sentance

Note, there is no extra line between the two.
Regards,
Peter Foti
PS- Incorrect spelling of sentence left in to match the example above. :)

Jul 19 '05 #6
Yeah ok, put those lighters down "flame boys" :o)

My use of the old vbCRLF is typically when constructing emails being sent
from ASP, usually I'd pop 2 of them on the end of a line to leave a space -
clearly got carried away with the thought of posting something helpful - and
then failing :o/

Thank you also for pointing out my illiteracy skills...

Regards

Rob
Jul 19 '05 #7
"Rob Meade" <ro********@N O-SPAM.kingswoodw eb.net> wrote in message
news:Zn******** **************@ news-text.cableinet. net...
Yeah ok, put those lighters down "flame boys" :o)

My use of the old vbCRLF is typically when constructing emails being sent
from ASP, usually I'd pop 2 of them on the end of a line to leave a space - clearly got carried away with the thought of posting something helpful - and then failing :o/

Thank you also for pointing out my illiteracy skills...


LOL! Hey, we all make mistakes. :)

Best,
Peter
Jul 19 '05 #8
"Rob Meade" <ro********@N O-SPAM.kingswoodw eb.net> wrote:
"eddie wang" wrote...
What is CRLF? Thanks.


CRLF = Carriage Return Line Feed

Effectively hitting the return key twice, thus leaving an empty line between
text.


Nope, in DOS and Windows a CRLF is a single line break. To get an
empty line between lines of text (double-space) you'd need two of
them: CRLFCRLF

--
Tim Slattery
MS MVP(DTS)
Sl********@bls. gov
Jul 19 '05 #9
On Wed, 03 Mar 2004 10:09:13 -0800, eddie wang <ew***@kmg.co m> wrote:
What is CRLF? Thanks.


And to expand yet some more:

CR is a return of the carriage to the first character position, if you
only did this each line would print over the top of the previous one.

LF is to feed the paper one line's height so the above doesn't happen.
But if you don't return the carriage to the home character then you
end up with stair-stpe text.

It's interpreted differently between DOS and UNIX systems as well, in
a DOS/Windows system a CR includes a LF, but Unix systems keep them
separate. You may run into this in some data files where the
DOS/Windows lack of a LF can screw up dipslays on some older Unix
systems (Virtually all current implementations got intelligent).

In ASP code, it's often used in a VbCrLf format, after a
Response.Write or other statement. Such as:

Response.Write "This is text" & VbCrLf
Response.Write "This is more text" & VbCrLf

This way, a View Source shows:

Response.Write "This is text"
Response.Write "This is more text"

Otherwise you'd see the code as:

Response.Write "This is text"Response.W rite "This is more text"

Handy for readability and debugging, as is the use of the &_ to break
single-line statements over multiple lines in the code.

Jeff
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
24786
by: McKirahan | last post by:
How would I use a regular expression to remove all trailing Carriage Returns and Line Feeds (%0D%0A) from a textarea's value? Thanks in advance. Also, are they any great references for learning how to use Regular Expressions?
5
16076
by: McKirahan | last post by:
I'd like to use regular expressions to remove extraneous Carriage Return Line Feeds (CrLf) from a textarea before the form is submitted. I'd like to remove all trailing CrLf's and convert all instances of 3 consectutive CrLf's to just 2. I first escape() the textarea and match "%0D%0A" (i.e. CrLf). Here's what I've been testing; watch for word-wrap:
3
10734
by: Jon | last post by:
Hi... I'm getting stumped over the something that MUST be simple...basically, I'm trying to replace the characters 0D0A with a crlf, using Regex.Replace(). The problem is, the replaced string includes the literal \r and \n, not a CRLF. I've also tried Enviroment.Newline, but this gives the same effect. Can anyone help me with this?
1
2242
by: Jack Wright | last post by:
Dear All, In a multiline field if I enter the following way: Mangesh Anant Kodilkar There is a carriage return after each word. Now when I press save,it loses the CRLF characters. This is not correct. Even after the page is reloaded the CRLF's are lost. I get this problem on my PC (XP), on Win (2000), on Win (NT & 98). So I
2
2290
by: Michael Persaud | last post by:
Hi All, Im trying to have a few strings presented in a LABEL. However the CRLF is not working. eg str = str1 + crlf + str2 + crlf + str3 label.text= str Do i need to declare the crlf as a public constant with chrw(10) + chrw(13)?? cause this does nothing either
2
1884
by: Andrew | last post by:
Hello. I am working with very large files in my .NET project (1 million plus records). Some of these files do not have crlf's, which makes it very hard to read the file without a layout or record length. In my application, I would like to open one of these text files and check to see if it contains crlf's before proceeding in my code. I tried using the streamreader, but readline() cancels out with a memory error because it thinks the...
0
1422
by: Tomas | last post by:
When I use a __doPostBack to submit a page to the server the last textbox on the page always contains a CRLF. I've used HttpRequest.SaveAs to dump the entire request (IIS 6) to disk and the body of the message reads like this viewstate=blahblahblah&txtPhoneNumber= A CRLF is present at the end of the line and it's included in txtPhoneNumber.Text. This causes my validator to fail. The validator insures that if any characters are entered...
8
13786
by: kerberoz | last post by:
whats the equivalent following ControlChars.Lf, ControlChars.Cr, ControlChars.CrLf code in vb.net
9
2794
by: amyl | last post by:
I have an application that is reading data from text files to the first occurrence of a double crlf. I have this working using streamreader and using readline. However, I am hitting 500+ files at a time and this is a bit slow. I was thinking of testing this using FileStream or something similar, but I am not sure how to detect the occurrence of crlf crlf? Thoughts?
0
10038
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9879
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5940
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6142
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3360
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.