<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Bruno:<br><br>I could not open a csv directly in Excell, but if open first a blank document and then import a text document, Excell will allow you to select the UTF-8 to get your csv right open.. In windows vista choose Data -->from text...<br><br>Bye<br><br>Victor<br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 23 Apr 2008 10:00:04 +0200<br>From: Bruno Friedmann <<a ymailto="mailto:bruno@ioda-net.ch" href="mailto:bruno@ioda-net.ch">bruno@ioda-net.ch</a>><br>Subject: [Cartoweb-users] ClientExportCSV : trouble with header type<br> sended<br>To: <a
ymailto="mailto:cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a><br>Message-ID: <<a ymailto="mailto:480EEC84.7070305@ioda-net.ch" href="mailto:480EEC84.7070305@ioda-net.ch">480EEC84.7070305@ioda-net.ch</a>><br>Content-Type: text/plain; charset=UTF-8<br><br>Hi All,<br><br>Facing to bugs in excel ( was unable to directly open a csv exported in utf-8)<br>I've made a look a ClientExportCSV :<br><br>There's a little mistake at the end<br><br>getExport look if a separator is defined in configuration<br> if (!is_null($this->getConfig()->separator)) {<br> $sep = $this->getConfig()->separator;<br> } else {<br> $sep = ';';<br> }<br><br>But in<br> public function output() {<br>
header('Content-Type: application/csv-tab-delimited-table; charset='<br> . Encoder::getCharset());<br> header('Content-disposition: filename=' . $this->fileName);<br> print $this->getExport()->getContents();<br> return '';<br> }<br>We found a forced Content-Type which doesn't exist in normal mime.types !<br>under debian<br>cat mime.types | grep csv<br>text/comma-separated-values csv<br>cat mime.types | grep tsv<br>text/tab-separated-values tsv<br>under opensuse<br>text/x-comma-separated-values csv<br>ext/tab-separated-values tsv<br><br>This pose some trouble. also the .csv extension is forced.<br><br>After long research it would be clear that excel doesn't
understand UTF-8 (only UTF-16 but in a very Microsoft way)<br><br>I think that it could be possible to modify a bit the plugin to use .tsv extension and tab,<br>comma and .csv for default. Allowing to send the correct content-type header.<br><br>What are your ideas about that ?<br><br>-- <br><br> Bruno Friedmann<br><br></div><br></div></div><br>
<hr size=1><br><font face="Verdana" size="-2">Enviado desde <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52431/*http://es.docs.yahoo.com/mail/overview/index.html">Correo Yahoo!</a><br>La bandeja de entrada más inteligente.<br></font></body></html>