Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39281

junk in email

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.8.x
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
    • Previous Issue Keys:
      KNL-876

      Description

      In announcments, add   to something the is otherwise ASCII. Request an email notification.

      Notifications will arrive with =C2=A0 in place of the &nbsp. What is supposed to be there is just =A0. The =C2 comes because it is being sent as UTF-8 even though Content-Type: text/plain; charset=iso-8859-1

      The code in MyMessage figures out what the least drastic charset needed is, and sets it in the header. Unfortunately that has no effect on the way the data is processed by the MimeMail code. The message is sent as UTF-8. This happens even if you use setText with an explicit argument of iso-8859-1. Looking at the code for MimeBodyPart, it clearly uses the charset option only to generate the header, but not to do the actual character set processing.

      The only solution I can think of is to do a getBytes myself, specifying the charset. The original code would use Content-transfer-encoding of 7bit or quoted-printable. However with this approach, I have to specify the transfer encoding myself. Without doing yet another check of the text, the safest thing seems to be to use quoted-printable all the time.

      The same problem exists in BasicEmailService.setContent. However I haven't had a chance to set up a test case for that, so I'm not fixing it.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  Unassigned Unassigned
                  Reporter:
                  hedrick Charles Hedrick
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration