[ZendTo] Re: IE8 issue downloading files in non Latin charset

Jules Jules at Zend.To
Thu Nov 24 09:46:26 GMT 2011


I have added that code for the next release.

Thanks!
Jules.

On 22/11/2011 10:50, --[ UxBoD ]-- wrote:
> 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'] .'"');
> }
>

Jules

-- 
Julian Field MEng CITP CEng
www.Zend.To

Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

'It's okay to live without all the answers' - Charlie Eppes, 2011
'All programs have a desire to be useful' - Tron, 1982
'That is the land of lost content,
  I see it shining plain,
  The happy highways where I went,
  And cannot come again.' - A.E. Houseman



More information about the ZendTo mailing list