ContentsIndexPreviousNext

CGI_STRIP_CR

When this variable is set to "1" (on, true, yes), the runtime automatically removes carriage return characters from data entered in HTML TEXTAREAS (multiple line entry-fields). Stripping the carriage returns from this kind of input prevents double-spacing problems, as well as conflicts that may arise if the data is used in a context that does not expect a carriage return character to precede each line feed character. Some browsers send a carriage return line feed sequence to the CGI program, and when this sequence is written to a file on operating systems that terminate text lines with line feed characters only, the file may appear to be double spaced. The default value is "0" (off, false, no).

For example, if you enter the following three lines in a TEXTAREA for a field called "thetext":

Sometext line 1
Sometext line 2
Sometext line 3

The browser sends the following to the CGI program:

thetext=Sometext+line+1%0D%0ASometext+line+2%0D%0ASometext+line+3%0D%0A

If the CGI_STRIP_CR is set to "1" (on, true, yes), the runtime strips the carriage return characters so that the input line is the following:

thetext=Sometext+line+1%0ASometext+line+2%0ASometext+line+3%0A