[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Printing plain text to browser problem



You wrote:
> Hi,
>
> I have a cgi script that attempts to print some plain text to the users
> browser using the text/plain Content-type http header.
>
> I'm running into a very weird problem, which is, some of the data that
> should be displayed is not even though it IS in the document source (when
> the document source is viewed). Obviously, the problem is browser related.
> It happens with Netscape 3.01 and Communicator as well as IE 3x. Since it's
> a plain text document that is being generated I have not included any HTML
> tags in the results.
>
> Is there a limit to the number of characters that can be on one line in a
> plain text file when viewed via a browser? Has anyone else run into or
> defeated this problem?
>
> Any help much appreciated.
>
> Thanks in advance,
>
> John
>

As far as I know, the RFCs don't define any limit for a line length. I think  
this is purely a brower related problem because depending on how they are  
made, they will allow you or not to see very long lines. This fact happened to  
me many times (with Navigator or Explorer under MacOS or windoze). In fact,  
if parts of your documents are on a single line, I suggest you to split it and  
to use more "\n"... I think this problem is due to the fact that browsers  
don't wrap lines whenthey display a pure text file.

There is another simpe solution which is to generate an html document  
(Content-type: text/html) and to just print something like that:

    <HTML><BODY>
    [here you put yopur text]
    </BODY></HTML>

And thus, all your text will be automatically wrap in the browser.

-------------------------
APERGHIS-TRAMONI Sebastien
Word Wide Web : http://www.resus.org/~madingue
E-Mail : madingue@cis.uni-muenchen.de
        (madingue@tango.resus.univ-mrs.fr)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch