Forum Moderators: coopster

Message Too Old, No Replies

Header problem?

Text is considered binary?

         

Garfield

4:44 pm on Jun 23, 2006 (gmt 0)

10+ Year Member



Hi,

I couldn't really find a good title for my problem. I have a page that generates a rtf-file ad offers it for download. But when I open the file (regardless wheich program I use) it is opened as simple text with all the rtf formating. If I open it in Wordpad and save it again without changing a single byte, it is opened correctly the next time.

Any idea what goes wrong in my export? Maybe any strange characters that make Wordpad trip?

Thanks in advance!

mcavic

5:36 pm on Jun 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One possibility is that the file is being generated with LF-only formatting instead of CRLF. That will usually confuse Windows, but if you open the file and resave it without making changes, some editors will correct the formatting.

If it's your own PHP code that's generating the rtf file, it should use \r\n at the end of each line that it outputs instead of just \n.