[ZendTo] IE8 issue downloading files in non Latin charset

--[ UxBoD ]-- uxbod at splatnix.net
Tue Nov 22 10:50:17 GMT 2011


Hi Jules, 

While a client has been testing our changes for ZendTo to support non-Latin character sets eg. Chinese we found that all works well in Firefox and Chrome, yet when downloading files in IE8 they appear as garbaged names. It appears IE8 does not honour UTF-8 correctly for names so I have made the following change which appears to resolve the issue quite nicely in NSSdropoff.php : 


// header(sprintf('Content-Disposition: attachment; filename="%s"', 
// $fileList[0]['basename']) 
// ); 

if ( preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) { 
header( 'Content-Disposition: attachment; filename="' . urlencode( $fileList[0]['basename'] ) . '"' ); 
} else { 
header( 'Content-Disposition: attachment; filename="' . $fileList[0]['basename'] .'"'); 
} 

-- 
Thanks, Phil


More information about the ZendTo mailing list