Ticket #320 (closed Bugs: fixed)

Opened 8 years ago

Last modified 8 years ago

Vietnamese text fails to decode correctly when QP-encoded

Reported by: octo Owned by: octorian
Priority: normal Milestone: 2.0
Component: LogicMail Version: 2.0.0
Keywords: Cc:
Blocked By: Blocking:

Description

This bug has been reproduced on the simulator using OS 4.5. It does not seem to occur on OS 5.0.

The following test message fails to decode correctly:

Date: Fri, 6 May 2011 05:05:02 -0700 (PDT)
From: John Doe <doej@generic.org>
Subject: Viet Test
To: doej@foo.com
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

T=C3=B4i l=C3=A0 ng=C6=B0=E1=BB=9Di Vi=E1=BB=87t Nam.

To be more specific, Vietnamese text sent as UTF-8 Unicode that has been encoded as Quoted-Printable fails to decode/display correctly on OS 4.5 devices. If this same text is encoded with Base64, it decodes correctly.

Once decoded, the "Unicode normalization" feature is still required for it to display correctly on any pre-5.0 device.

This might be a general UTF-8 QP issue, and may have simply not been detected because most non-English UTF-8 tends to be encoded with Base64.

Change History

comment:1 Changed 8 years ago by octo

It turns out that this bug was a side-effect of an old workaround that was left in MessageFieldFactory.getNormalizedText(), and could actually be reproduced in 5.0 as well by enabling normalization. That workaround was put in place to deal with poor charset handling during Quoted-Printable decoding. Since that issue has long since been fixed in the QP decoder, but the workaround was never removed, this unfortunate side-effect resulted.

Thankfully the fix for this bug was a simple matter of deleting the workaround code.

comment:2 Changed 8 years ago by octorian

  • Status changed from new to closed
  • Owner set to octorian
  • Resolution set to fixed

In [856]:

Removed old decoding workaround code for normalization (fixes #320)

comment:3 Changed 8 years ago by octo

  • Status changed from closed to reopened
  • Resolution fixed deleted

Bug still exists within the BrowserFieldRenderer for HTML display.

comment:4 Changed 8 years ago by octo

  • Status changed from reopened to closed
  • Resolution set to fixed

In [866]:

Removed old decoding workaround code for normalization from HTML rendering (fixes #320)

Note: See TracTickets for help on using tickets.