On 2004.05.20, Tom Jackson <[EMAIL PROTECTED]> wrote: > I have a simple test case form which contains a single text area and > uses method=POST. > > To test, when the data arrives I do: [...] > The contents of /tmp/text-text.txt is the same as the input except > newlines are converted to the network newline crlf, and show up in vi > with each line ending in ^M.
They're not converted. The browser submits newlines as CR/LF. The server receives exactly what the browser sent. If you really want to remove those and you know the submitted data is plain text, you could walk the data "line by line" and strip the trailing LF before you write each line to your output file. However, I wouldn't do this in general because, in the event that you want to receive binary data (file uploads from the browser), you do NOT want to be transforming CR/LF -> CR. -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
