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 would allow Courier to function properly, without actually fixing the quoted-printable code. A proper fix would probably involve decoding the MIME part, reading each character, verifying that there are enough bytes in the line to hold this character, and then either inserting "=20" or the bytes that compose the character. An example of the problem follows. Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: <[EMAIL PROTECTED]> =E3=81=AB=E3=81=BB=E3=82=93=E3=81=94=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E3= =81=BB=E3=82=93=E3=81=94=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E3=81=BB=E3=82= =93=E3=81=94=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E3=81=BB=E3=82=93=E3=81=94= =E6=20 =97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E3=81=BB=E3=82=93=E3=81=94=E6=97=A5=E6=9C= =AC=E8=AA=9E=E3=81=AB=E3=81=BB=E3=82=93=E3=81=94=E6=97=A5=E6=9C=AC=E8=AA=9E= =E3=81=AB=E3=81=BB=E3=82=93=E3=81=94=E6=97=A5=E6=9C=AC=E8=AA=9E=E3=81=AB=E3= =81=20 ------------------------------------------------------------------------- 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
