FreeStyleWiki
Revision | e14a14db613678fe486838a46245c1ff8eb990f0 (tree) |
---|---|
Zeit | 2018-04-17 18:55:33 |
Autor | kgsoft <kgsoft@user...> |
Commiter | kgsoft |
BugTrack-wiki/351 : Edgeブラウザーにおけるダウンロードファイル名の文字化け対応
@@ -723,7 +723,7 @@ sub make_content_disposition { | ||
723 | 723 | my ($filename, $disposition) = @_; |
724 | 724 | my $ua = $ENV{"HTTP_USER_AGENT"}; |
725 | 725 | eval("use MIME::Base64;"); |
726 | - my $encoded = ( $ua =~ /MSIE|Trident/i ? Jcode->new($filename)->sjis | |
726 | + my $encoded = ( $ua =~ /MSIE|Trident|Edge/i ? Jcode->new($filename)->sjis | |
727 | 727 | : $ua =~ /Chrome|Firefox/i ? "=?utf-8?B?".MIME::Base64::encode_base64(Jcode->new($filename)->utf8,'')."?=" |
728 | 728 | : Jcode->new($filename)->utf8 ); |
729 | 729 | return "Content-Disposition: $disposition;filename=\"".$encoded."\"\n\n"; |