[Clipart] upload script problem?

Stephen Silver ocalocal at btinternet.com
Tue Mar 29 00:50:40 PST 2005


Jonadab wrote:

> The POD for HTML::Entities *claims* that the encode_entities function,
> the way I am using it without a second argument, encodes "control
> chars, high-bit chars, and the <, &, >, and " characters."  I would
> *think* that would be everything except printable ASCII characters,

Yes, I think that's more-or-less what it does.

> I tested with encode_entities_numeric (because, trying that was easy),
> but it does not seem to solve the problem.

It wouldn't make any difference, as you would still get the same
conversion from codepage-1252 to UTF-8.

> This bug may have to wait for the charset issues to be sorted out in
> general.

That won't solve the problem for binary files, as there's still the
truncation issue.

> unless we decide to store the file on the server ad interim and
> send the browser a cookie that refers to it, which would also save
> bandwidth

Storing the file on the server has to be the best way.  You don't
necessarily need cookies for this, as you could put the filename
in the upload form.

> but create other issues.

I don't see any major issues with this, although I could be missing
something.  Discarded files will end up cluttering the server, but
if they are kept in a separate directory they can easily be cleaned
off every now and then.

-- 
Stephen Silver




More information about the clipart mailing list