[Tickets #129] RESOLVED: attachment filename decode problem
bugs@bugs.horde.org
bugs at bugs.horde.org
Sun Oct 1 22:39:30 PDT 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=129
-----------------------------------------------------------------------
Ticket | 129
Updated By | felix5ng at yahoo.com.hk
Summary | attachment filename decode problem
Queue | IMP
Version | HEAD
Type | Bug
State | Not A Bug
Priority | 1. Low
Owners | Horde Developers
-----------------------------------------------------------------------
felix5ng at yahoo.com.hk (2006-10-01 22:39) wrote:
I found that IE doesn't accept non-ASCII URL, the information from www we
should use urlencode to encode the filename.
I tested this on my system (win XP TC, Win XP Eng, Win2K TC, Win2K Eng,
Win Me TC) for chinese filename. it's OK
However I found two functions( rawurlencode, urlencode ) in php do similar
job, I don't known which one is best for this job.
I try both on my test, both are OK for my test filename.
Not only IMP but also gollem
I hope someone can test this solution on other lang system.
I modifity the file horde/lib/Horde/Browser.php, function downloadHeaders
inside the code that special for msie
Below is the code
/* MSIE doesn't like multiple periods in the file name. Convert
all periods (except the last one) to underscores. */
if ($this->isBrowser('msie')) {
if (($pos = strrpos($filename, '.'))) {
$filename = strtr(substr($filename, 0, $pos), '.', '_') .
substr($filename, $pos);
}
/* add the follow line to encode the filename */
$filename = rawurlencode($filename);
}
More information about the bugs
mailing list