[Catalyst] CSV / UTF-8 / Unicode

Bill Moseley moseley at hank.org
Tue Jul 2 17:26:44 GMT 2013


On Tue, Jul 2, 2013 at 9:29 AM, Craig Chant
<craig at homeloanpartnership.com>wrote:

>  >> All the above seems overkill.   I suspect what you want is closer to
> this: (but see notes below).
>
>
>
> Tried that, didn=92t work, ended up in a long Catalyst discussion where it
> was worked out that I needed to wrap any XLS output to an IO:FILE handle
> otherwise Catalyst dies with an =93out of memory=94 error something to do=
 with
> streaming data support issues in Catalyst so the work round is to wrap the
> output into an IO:File object.
>

$xls is a scalar you have in memory of the comma separated value data?



>
>
> >>Second, be aware that $c->response->content_length(length($xls));
>
>
>
> Yes, I was doing the encode then using Length (I did read on perldocs
> about requesting the length against the octet) , either way, the length w=
as
> the least of my worries, keeping Catalyst from falling over with =91Wide
> Character=92 errors, or not getting garbage was my main concern.
>
>
>
> And yes, the output is CSV not strictly XLS but I have been told and
> looked it up on the net that 'application/vnd.ms-excel'  Is the correct
> MIME header to pass for CSV that you want MS Excel to open.
>

http://www.ietf.org/rfc/rfc4180.txt, but how Windows decides how to open
files is something I'm not familiar with.



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20130702/bfe29=
d40/attachment.htm


More information about the Catalyst mailing list