[imp] Swedish chars in attachment in imp 4

Peter Andersson mailinglists at skolmail.finspong.se
Sun Jan 23 05:44:02 PST 2005


Jan, Thank you for your answer.

The ticket 129 describes what I have concluded so far, it is a IE bug.

Now, I live in Sweden, and I don't know about other countries but here a
recent survey on four of the largest sites in Sweden says that 95% of the
visitors use IE!

So, I cannot with creditibility say that this is a IE bug and that there is
no way around this. I really need to address this issue.

So, of curiosity I created a Hotmail account, sent myself an attachment and
checked the behaviour,
and guess what, I was surprised.

Well, not entirely, 'cause as expected all pages are shown in ISO-8859-1
encoding. File download with swedish chars worked as expected, the only
strange thing was that all spaces in the filename were stripped off! Happens
in both IE and Firefox (Win).

I don't mean to compare a clean good Mail client with the MS fashion of
Hotmail, but as a how-to-get-IE-working test it works well.

So, my question is now, Is there a way to tell IMP which output encoding to
use by default, which I suppose there aren't.

Next question is, Can I get a brief description of the works of
encoding/decoding in Horde/IMP?

I could try with a guess and maybe someone could correct where I am wrong,
and when I know how it works, I might be able to do some changes to make it
work with IE. As a config option.

My guess about how IMP handles Decoding/Encoding:

Mail in mailbox, view:
The encoding header is read and all contents are converted to UTF-8. IF no
Content-type header tells IMP the charset, it is assumed to be UTF-8. All
parts of the page is converted (if not already in UTF-8).
The page is sent with all parts including message in UTF-8.

Mail compose:
Mail is composed on screen in UTF-8. Mail is converted into the chosen
encoding and sent.
Attachment filenames are treated as expected by browser.

So I would like to insert two things into the page rendering code.
1. If no charset is in header assume ISO-8859-1. This could in my guess be
achieved by hooking in a ISO-8859-1 to UTF-8 conversion when reading the
mail. (I know this is a different subject but it has to do with
encoding/decoding).
2. When the whole page is renderred, convert it to ISO-8859-1 from UTF-8,
change encoding meta and let the usual send process start.

/Peter

----- Original Message ----- 
From: "Jan Schneider" <jan at horde.org>
To: <imp at lists.horde.org>
Sent: Sunday, January 23, 2005 12:17 PM
Subject: Re: [imp] Swedish chars in attachment in imp 4


Zitat von Peter Andersson <mailinglists at skolmail.finspong.se>:

> Hello.
>
> I feel kind of stupid asking this 'cause I'm sure this works well
elsewhere,
> but I'm stuck and need help.
>
> Currently we have a IMP 4.0 CVS running in production (from about jan
2003).
> All pages are shown in ISO-8859-1 and when I click on attachments for
> download
> MSIE behaves fine (there are bugs in IMP for certain types, but
> filenames with
> åäö isn't a problem).
>
> Now I have installed a fresh IMP 4.0.1 (thanks for the app!) and it shows
> pages in UTF-8 by default. That is fine with me, but it seems to me
> as if MSIE
> cannot handle the attachments with åäö in filename. It seems like
> UTF-8 combos
> instead of the swedish char in filename.
> I tried the same files with Firefox, and it works well.
>
> Is this a MSIE bug, a IMP bug, or me beeing stupid somewhere?

A MSIE bug. See http://bugs.horde.org/ticket/?id=129

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-- 
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe at lists.horde.org



More information about the imp mailing list