What is the best mime-type and extension to use when exporting tab delimited?

EvilPuppetMaster picture EvilPuppetMaster · Nov 5, 2008 · Viewed 15.6k times · Source

I've come across the problem where Excel will not play nice with UTF-8 encoded CSV files. See this related question on Stack Overflow.

I've followed the solution of exporting as UTF-16, however it seems that with UTF-16, the comma character doesn't work as a delimiter, only the tab character.

However I can't find anywhere what the correct filename and mime-type should be for tab-delimited files. I found somewhere stating that it was application/vnd.ms-excel and xls. This works ok for Excel 2003 but 2007 does not approve.

So what should it be?

Answer

PatrickvL picture PatrickvL · Nov 25, 2008

For tab-delimited files, http://www.rfc-editor.org/rfc/rfc4180.txt mentions 'text/tab-separated-values'.

That format is (sparsely) described at http://www.iana.org/assignments/media-types/text/tab-separated-values.

More info can be found at : http://www.cs.tut.fi/~jkorpela/TSV.html

I hope this helps?