<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Re: [Seaside] Downloads and filenames with diacritics</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Have you tried hexing the bytes and using that as a filename?<BR>
<BR>
(aString asByteArrayEncoding: #utf8) asHexString<BR>
<BR>
-Boris (via BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: Seaside - general discussion &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Tue Sep 28 09:24:26 2010<BR>
Subject: Re: [Seaside] Downloads and filenames with diacritics<BR>
<BR>
Yeah, we actually saw that possibility but I was hoping to make the app not to be forced to maintain the original name in the database (so it can't never be confused about it nor inject maintenance costs).<BR>
<BR>
What do you guys think about some other way to encode the filename that preserves the original (with diacritics) but for the OS (and xsendfile) it can look like a non-diacritical one?<BR>
<BR>
any ideas? (or encoders to suggest?)<BR>
<BR>
sebastian<BR>
<BR>
<BR>
<BR>
On Sep 28, 2010, at 1:11 PM, Miguel Cobá wrote:<BR>
<BR>
&gt; El mar, 28-09-2010 a las 13:03 -0300, Sebastian Sastre escribió:<BR>
&gt;&gt; Hi guys,<BR>
&gt;&gt;<BR>
&gt;&gt; I've been using this:<BR>
&gt;&gt;<BR>
&gt;&gt; (GRCodec forEncoding: 'utf-8') encode: aFilaname<BR>
&gt;&gt;<BR>
&gt;&gt; just before writing an uploaded file (that probably has diacritics in its name).<BR>
&gt;&gt;<BR>
&gt;&gt; The thing is that xsendfile doesn't find the ones with diacritics and the download fails. Non diacritical downloads works just fine.<BR>
&gt;&gt;<BR>
&gt;&gt; As workaround I'm forcing filenames to be non-diacritical while we find a solution.<BR>
&gt;&gt;<BR>
&gt;&gt; Wonder if any of you guys have solved making your webapp to offer files download even when the filenames has diacriticals? I mean with xsendfile (from a seaside app of course).<BR>
&gt;<BR>
&gt; Store the files with numbers and save the original name in the database.<BR>
&gt; Xsendfile the numbered file and state that the file should be offered<BR>
&gt; with the original name. For example, in PHP:<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp; header(&quot;X-Sendfile: $numberedfile&quot;);<BR>
&gt;&nbsp;&nbsp;&nbsp; header(&quot;Content-Type: application/octet-stream&quot;);<BR>
&gt;&nbsp;&nbsp;&nbsp; header(&quot;Content-Disposition: attachment; file=\&quot;$originalname\&quot;&quot;);<BR>
&gt;<BR>
&gt; The downloaded file needs not to be the same name that the save as<BR>
&gt; offered by the browser.<BR>
&gt;<BR>
&gt; Cheers<BR>
&gt;<BR>
&gt;&gt;<BR>
&gt;&gt; sebastian_______________________________________________<BR>
&gt;&gt; seaside mailing list<BR>
&gt;&gt; seaside@lists.squeakfoundation.org<BR>
&gt;&gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt;<BR>
&gt; --<BR>
&gt; Miguel Cobá<BR>
&gt; <A HREF="http://miguel.leugim.com.mx">http://miguel.leugim.com.mx</A><BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; seaside mailing list<BR>
&gt; seaside@lists.squeakfoundation.org<BR>
&gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
<BR>
_______________________________________________<BR>
seaside mailing list<BR>
seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
</FONT>
</P>

</BODY>
</HTML>