Gordon Messmer writes:

Bernd Plagge wrote:

there seems to be a bug in sqwebmail where Japanese mail get crippled
i.e. characters get modified and not readable any more.

The problems seems to occur when 'soft breaks' (flowed format) are
inserted into the text. The text is encoded in 'quoted-printable' format and according to the
RFC soft-breaks are inserted 'between words'.

The problem with Japanese text is that the normal text flow does not
contain spaces. This necessarily leads to lines exceeding the
predetermined text length.
- - From what I can see the program is searching for (single byte) space
characters and then applies soft breaks. However, a single byte space
character is likely to be the first or second byte of a double byte
Japanese character and thus the inserted soft break destroys the
character.

Sam, I was taking a look back at some issues that have been reported. It looks like this one is caused when a message is sent via SQwebmail, and "=20" is inserted after the 72nd byte, regardless of whether that was one of a multi-byte character. Unfortunately, I'm not familiar enough with this code to actually fix it.

The easy fix would be to use base64 encoding rather than quoted-printable, or at least give admins an option to do so. That

The problem with that is that there does not seem to be a base64-equivalent of flowed text format. Flowed text is based on unencoded, or qp-encoded text.

No, there right solution here is to make flowed text wrapping unicode-aware, and wrap only at multibyte character boundaries. Now that the real problem is known, it can be solved. It'll probably be quite a bit of work, but, that's the right fix.

It would be helpful to have some samples of utf8 text that, when pasted into sqwebmail, results in bad flowed-text wrapping. I can use it as a text case.


Attachment: pgpCIrgg75rPs.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to