[imp] Subject line encoding problem
Jan Schneider
jan at horde.org
Thu Dec 6 16:01:53 UTC 2007
Zitat von "Daniel A. Ramaley" <daniel.ramaley at DRAKE.EDU>:
> Hello. I've recently discovered an issue with Subject line encoding on
> our webmail server. It runs Horde 3.1.5 and Imp 4.1.5 (also Ingo 1.1.4
> and Turba 2.1.5, though i doubt the problem is with one of those). The
> problem is that for some encodings the Subject line is not encoded
> correctly.
>
> For testing, i sent a message 3 times, each time selecting a different
> encoding. In both the Subject and the body i typed "日本語" ("Japanese
> language" in Japanese). I repeated the same test with kmail, a desktop
> e-mail client.
>
> With Horde/Imp:
>
> Encoding Subject line
> ----------- ----------------------------------
> ISO-8859-1 ???
> UTF-8 =?utf-8?b?5pel5pys6Kqe?=
> ISO-2022-JP =?UNKNOWN?Q?=1B$BF|K=5C8l=1B=28B?=
>
> For both UTF-8 and ISO-2022-JP, the message body came through perfectly.
> For ISO-8859-1, the body just contained 3 question marks (but that
> seems understandable since 日本語 cannot be represented in ISO-8859-1).
> But the Subject line for ISO-2022-JP does not display correctly when
> the message is received. I'm not sure what encoding Imp put it in, and
> from its own use of "UNKNOWN" it looks like Imp wasn't so sure either.
When trying to reproduce this, the iso-2022-jp test results in the
subject not being encoded properly at, but sent as-is. Both is
obviously a bug, so please create a ticket on bugs.horde.org.
> Also, why does Horde/Imp require the user to select the encoding in the
> first place? Desktop clients usually select the most appropriate
> encoding automatically. Kmail, for instance, usually uses either
> US-ASCII or ISO-8859-1. But if i type some Japanese characters into an
> e-mail, it automatically switches to ISO-2022-JP (the most common
> encoding for Japanese e-mail). I'm sending this message from Kmail as
> UTF-8.
PHP doesn't support automatic detecting of charsets, and it's even
much more complicated to detect it client-side, i.e. when typing the
message. We already do choose the most appropriate encoding though,
because we choose the encoding that matches the currently selected
interface language.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the imp
mailing list