Re: data URIs - filename and content-disposition

On Wed, 24 Feb 2010 05:34:55 -0500, Julian Reschke <julian.reschke@gmx.de>  
wrote:

> did you make tests whether existing UAs properly parse (== ignore) new  
> parameters?

I tested more complex filename values and tested them raw and  
percent-encoded. (Not sure if the values should be percent-encoded before  
being placed in a data URI or not, in this case, so I tried both ways)

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename*=utf-8''%E2%88%9A.txt;content-disposition=attachment,%E2%88%9A

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename*=utf-8''%25E2%2588%259A.txt;content-disposition=attachment,%E2%88%9A

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename="=?UTF-8?B?4oiaLnR4dA==?=";content-disposition=attachment,%E2%88%9A

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename=%22%3D%3FUTF-8%3FB%3F4oiaLnR4dA%3D%3D%3F%3D%22;content-disposition=attachment,%E2%88%9A

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename="with  
spaces.txt";content-disposition=attachment,%E2%88%9A

Fine in Opera, Safari and Firefox, but Firefox loses utf-8 encoding
data:text/plain;charset=utf-8;filename=%22with%20spaces.txt%22;content-disposition=attachment,%E2%88%9A


-- 
Michael

Received on Wednesday, 24 February 2010 12:39:53 UTC