[Tickets #3639] RESOLVED: download attachment incorrect file name

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Oct 1 22:00:52 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3639
-----------------------------------------------------------------------
 Ticket             | 3639
 Updated By         | felix5ng at yahoo.com.hk
 Summary            | download attachment incorrect file name
 Queue              | IMP
 Version            | 4.1
 Type               | Bug
 State              | Not A Bug
 Priority           | 2. Medium
 Owners             | Horde Developers
-----------------------------------------------------------------------


felix5ng at yahoo.com.hk (2006-10-01 22:00) wrote:

>>  I understand this is IE bug.
>>
>> Thank you.
> I found that IE doesn't accept non-ASCII URL,  form the information 
> form 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.
>
> 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);
>         }
>
I am sorry.
If you found the save dialog show any incorrect filename, check the 
IE->Tools->Options->advance tab->always use UTF-8 in URL
is enabled





More information about the bugs mailing list