[Tickets #129] RESOLVED: attachment filename decode problem

bugs@bugs.horde.org bugs at bugs.horde.org
Thu Jul 28 18:28:09 PDT 2005


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         | david at tmv.gov.tw
 Summary            | attachment filename decode problem
 Queue              | IMP
 Version            | HEAD
 State              | Bogus
 Priority           | 1. Low
 Type               | Bug
 Owners             | Horde Developers
-----------------------------------------------------------------------


david at tmv.gov.tw (2005-07-28 18:28) wrote:

> Just restarted on a upgrade from H2 to latest H3/IMP.
>
> I have similiar problems with swedish characters on attachment download.
>
> I have, as far as I can tell solved it for use at our site (very 
> quick and dirty).
>
> Maybe it helps someone else? Maybe someone can implement it correctly...
>
> Anyway, as far as I can tell, on single file download Firefox works 
> with swedish characters but IE doesn't. For me converting the sent 
> filename from "UTF-8" to "ISO-8859-1" solves the problem.
> So, in file imp/view.php, line 122 has been changed to (4 lines):
>    if (($browser->getBrowser() == 'msie') && ($browser->getMajor() >= 5))
>      $name = iconv("UTF-8", "ISO-8859-1", $mime->getName(true, true));
>    else
>      $name = $mime->getName(true, true);
>
> I am aware that this will probably break for other languages, but for 
> our swedish school environment it does the trick. Just did it today, 
> so I will evaluate it more, but still...
>
> Also, when downloading attachments in a single zip file, the 
> filenames are wrong in zip file.
> Made an even uglier hack for that:
> File view.php, line 96 (1 line):
>        $tosave[] = array('data' => $mime->getContents(), 'name' => 
> iconv("UTF-8", "850", $mime->getName(true, true)));
> Apparently WinZip in my case likes it this way. Will check more (and 
> with Linux browsers).
>
> /Peter
>
Hi Peter, it did work for me,thank you.
I also modified "ISO-8859-1"  to NLS::getEmailCharset() ,because BIG5 is my
prefer language.




More information about the bugs mailing list