<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Johan,<div><br></div><div>if you deal <b>only</b> with ASCII,&nbsp;you are okay<div><br></div><div>the problem is seen when you have this: &nbsp;</div><div>diacritics + uft8 encoding + excel<br><div><div><br></div><div>what happens is that excel opens the utf8 file with all the diacritics mangled.</div><div><br></div><div>Example:</div><div>"Descrição" is shown by excel as "<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 12px; ">Descrição"</span></div><div><br></div><div>I've tried the BOM header but it doesn't work on office for mac so I've just ecoded it in CP1252</div><div><br></div><div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><a href="http://about.me/sebastianconcept">sebastian</a></div><div><br></div><div>o/</div></div><br class="Apple-interchange-newline"></div></div><div>PD: see here for details:&nbsp;</div><div><a href="http://stackoverflow.com/questions/155097/microsoft-excel-mangles-diacritics-in-csv-files">http://stackoverflow.com/questions/155097/microsoft-excel-mangles-diacritics-in-csv-files</a></div><div><br></div><div><br></div><div>On Nov 24, 2011, at 1:20 PM, Johan Brichau wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Sebastian,<br><br>I noticed your question and, because we are also exporting csv but never seemed to bump into any encoding problem, I wonder if the following would not work for you.<br>We are doing it like this:<br><br>html anchor<br> &nbsp;&nbsp;&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>callback: [self requestContext respond: [ :response |<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>response <br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>attachmentWithFileName: 'yesplan',Date today yyyymmdd,'.csv';<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>contentType: (WAMimeType main: 'text' sub: 'csv');<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>nextPutAll: (String streamContents: [:str | self exportCSVOn: str])]];<br><br>Works for you too?<br><br>cheers<br>Johan<br><br>On 24 Nov 2011, at 14:52, Sebastian Sastre wrote:<br><br><blockquote type="cite">done.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It works.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Note that mime type is text/csv and it will answer false to #isBinary so it needed tweaking there<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">sebastian<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">o/<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Nov 23, 2011, at 7:06 PM, Lukas Renggli wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On 23 November 2011 21:38, Sebastian Sastre<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">&lt;<a href="mailto:sebastian@flowingconcept.com">sebastian@flowingconcept.com</a>&gt; wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Hi guys,<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">setting an anchor to download a document encodes the content right?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">there is a way to make seaside not to encode the document?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">sebastian<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">o/<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Set the response to binary.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Lukas<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">seaside mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-- <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Lukas Renggli<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://www.lukas-renggli.ch">www.lukas-renggli.ch</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">seaside mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">seaside mailing list<br></blockquote><blockquote type="cite"><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br></blockquote><br>_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></div></blockquote></div><br></div></div></body></html>