Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2571 Garbage characters when replying to UTF-8 encoded email

closed-duplicate
nobody
Compose (426)
5
2008-04-01
2008-03-25
Preben Hansen
No

Dear Squirrelmail developers,

I've got some emails with UTF-8 encoded bodies that are displayed correctly in the list view and the read_body view, but when I reply, the non-ASCII characters are not decoded properly in the quoted text.

Additionally, if the From: header contains a MIME encoded word that uses UTF-8, the inserted reply header exhibits the same problem. For instance, "From: =?UTF-8?Q?p=C3=A5ske?= <prutskovlen@example.com>". The encoded word appears to be decoded correctly, but isn't entitified or encoded to the charset of the served page.

Below is an almost minimal test case. It contains the Danish text "God påske!", but that becomes "God pÃ¥ske!" in the quoted text when I reply. Also, the subject line and the reply header appear to be garbled.

Best regards,
Prutskovlen

From: =?UTF-8?Q?p=C3=A5ske?= <prutskovlen@example.com>
To: prutskovlen@example.com
Subject: God =?UTF-8?Q?p=C3=A5ske?=
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

God p=C3=A5ske!

Discussion

  • Logged In: YES
    user_id=1020419
    Originator: NO

    Please state your SquirrelMail version, extra decoding library version, language used (I'm assuming Danish which is in ISO-8859-1 by default in SquirrelMail), language settings in "config/conf.pl", locales installed on your computer.

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2008-03-26

    Logged In: YES
    user_id=225877
    Originator: NO

    Turn on lossy encoding in SquirrelMail conf.pl 10. Language options.

     
  • Preben Hansen
    Preben Hansen
    2008-03-27

    Logged In: YES
    user_id=547188
    Originator: YES

    @tokul: Thanks for the tip, turning on lossy_encoding indeed made the problem disappear.

    I never suspected that this could be a configuration issue. Strictly speaking, in my example it wouldn't even be a lossy encoding because the "å" character actually exists in iso-8859-1. Given this behavior, the option should be renamed "potentially_lossy_encoding".

    In my opinion, it shouldn't even be possible to configure Squirrelmail to leave these octets in their original charset -- it will never make any sense. Please count my bug report as a vote in favor of changing the default.

    Best regards,
    Prutskovlen

     
  • Preben Hansen
    Preben Hansen
    2008-03-27

    Logged In: YES
    user_id=547188
    Originator: YES

    @tokul: Thanks for the tip, turning on lossy_encoding indeed made the problem disappear.

    I never suspected that this could be a configuration issue. Strictly speaking, in my example it wouldn't even be a lossy encoding because the "å" character actually exists in iso-8859-1. Given this behavior, the option should be renamed "potentially_lossy_encoding".

    In my opinion, it shouldn't even be possible to configure Squirrelmail to leave these octets in their original charset -- it will never make any sense. Please count my bug report as a vote in favor of changing the default.

    Best regards,
    Prutskovlen

     
  • Tomas Kuliavas
    Tomas Kuliavas
    2008-03-27

    Logged In: YES
    user_id=225877
    Originator: NO

    Function that makes decision about lossy encoding, does not check converted strings. It only checks input and output charsets. If input charset covers wider or different set of symbols, encoding is lossy. If input charset is UTF-8, conversion is lossy in all cases. I know only some exceptions, but function does not check for them.

    > Please count my bug report as a vote
    There is other report (#1235345) that complains about it. Filing multiple bug reports is not a voting. When charset conversion was implemented, I have chosen defaults that kept same behavior as previous SquirrelMail versions. Current SquirrelMail project developers are free to change it.

     
  • Preben Hansen
    Preben Hansen
    2008-03-27

    Logged In: YES
    user_id=547188
    Originator: YES

    @tokul: Thanks for your reply. In that case I'm sorry for the duplicate bug report, though I cannot seem to find report #1235345 anywhere. Can you provide a URL?

     
  • Preben Hansen
    Preben Hansen
    2008-03-27

    Logged In: YES
    user_id=547188
    Originator: YES

    @tokul: Thanks for your reply. In that case I'm sorry for the duplicate bug report, though I cannot seem to find report #1235345 anywhere. Can you provide a URL?

     
    • status: open --> closed-duplicate