OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
feb6935
)
BugTrack/2562 RFC6266: Standard UTF-8 Attachment file name
author
umorigu
<umorigu@gmail.com>
Mon, 21 Mar 2022 14:08:53 +0000
(23:08 +0900)
committer
umorigu
<umorigu@gmail.com>
Mon, 21 Mar 2022 14:08:53 +0000
(23:08 +0900)
plugin/attach.inc.php
patch
|
blob
|
history
diff --git
a/plugin/attach.inc.php
b/plugin/attach.inc.php
index
0cc0aac
..
c88ac5b
100644
(file)
--- a/
plugin/attach.inc.php
+++ b/
plugin/attach.inc.php
@@
-732,24
+732,14
@@
EOD;
$this->status['count'][$this->age]++;
$this->putstatus();
$filename = $this->file;
$this->status['count'][$this->age]++;
$this->putstatus();
$filename = $this->file;
-
- // Care for Japanese-character-included file name
- $legacy_filename = mb_convert_encoding($filename, 'UTF-8', SOURCE_ENCODING);
- if (LANG == 'ja') {
- switch(UA_NAME . '/' . UA_PROFILE){
- case 'MSIE/default':
- $legacy_filename = mb_convert_encoding($filename, 'SJIS', SOURCE_ENCODING);
- break;
- }
- }
+ // RFC6266 attachement file name
$utf8filename = mb_convert_encoding($filename, 'UTF-8', SOURCE_ENCODING);
ini_set('default_charset', '');
mb_http_output('pass');
pkwk_common_headers();
$utf8filename = mb_convert_encoding($filename, 'UTF-8', SOURCE_ENCODING);
ini_set('default_charset', '');
mb_http_output('pass');
pkwk_common_headers();
- header('Content-Disposition: inline; filename="' . $legacy_filename
- . '"; filename*=utf-8\'\'' . rawurlencode($utf8filename));
+ header('Content-Disposition: inline; filename*=utf-8\'\'' . rawurlencode($utf8filename));
header('Content-Length: ' . $this->size);
header('Content-Type: ' . $this->type);
// Disable output bufferring
header('Content-Length: ' . $this->size);
header('Content-Type: ' . $this->type);
// Disable output bufferring