Re: Export to csv
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Export to csv

From: John Dunlop <usenet+2004@john.dunlop.name>
Date: Fri Oct 07 2005 - 19:43:27 CEST

R. Rajesh Jeba Anbiah wrote:

> chotiwallah wrote:
>
> > header("Content-type: text/plain");
>
> IIRC, the correct Content-type for CSV is "text/x-csv".

I was going to make a similar remark but you beat me to it.

text/x-csv is common, for sure, but it isn't and can't be registered, it
being a 'private' type (indicated by the 'x-' prefix). I would say
text/x-csv is more useful at the moment in that the likelihood of its
being interpreted as signifying CSV is greater (at least in my browser).

I don't know how far text/plain is meant to stretch: at what stage do
things start becoming 'formatting commands or directives' (the wording of
RFC2046)? does this very post - the one you're reading - not contain
'formatting commands' in the shape of those quote markers >'s?

text/x-csv would be my choice too though.

[why does TSV have a registered type but not CSV?]

how you doin?

-- 
Jock
Received on Tue Oct 18 02:39:00 2005