Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-189

if Korean language is included in attachment file name, attachment file name is broken.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Labels:
      None

      Description

      if Korean language is included in attachment file name, attachment file name is broken.

      ex)
      [Attachment name]
      attachment name : 한글testfile한글한글한글한글testfile한글한글한글한글testfile한글한글한글한글testfile한글한글한글한글testfile한글한글한글한글testfile한글한글한글.txt
      actual received attachment name in gmail : =UTF-8_Q=ED=95=9C=EA=B8=80testfile=ED=95=9C=EA=B8=80_= =UTF-8_Q=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80testfil_= =UTF-8_Q_e=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=E__ __filename_3=D=95=9.txt=

      [Debug mode]
      Content-Type: text/plain; charset=UTF-8;
      name*0="=?UTF-8?Q?=ED=95=9C=EA=B8=80testfile=ED=95=9C=EA=B8=80?=
      =?U";
      name*1="TF-8?Q?=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=8";
      name*2="0testfil?=
      =?UTF-8?Q?e=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=E";
      name*3="D=95=9C?= =?UTF-8?Q?=EA=B8=80=ED=95=9C=EA=B8=80tes?=
      =?UTF-8";
      name*4="?Q?tfile=ED=95=9C?=
      =?UTF-8?Q?=EA=B8=80=ED=95=9C=EA=B8=80=ED";
      name*5="=95=9C=EA=B8=80=ED=95=9C=EA=B8=80?=
      =?UTF-8?Q?testfile=ED=95";
      name*6="=9C=EA=B8=80=ED=95=9C=EA=B8=80?=
      =?UTF-8?Q?=ED=95=9C=EA=B8=8";
      name*7="0=ED=95=9C=EA=B8=80testfile=ED=95=9C?=
      =?UTF-8?Q?=EA=B8=80=E";
      name*8="D=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C?=
      =?UTF-8?Q?=EA=";
      name*9="B8=80testf?=
      =?UTF-8?Q?ile=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=";
      name*10="80=ED=95=9C=EA=B8=80.txt?="
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment;
      filename*0="=?UTF-8?Q?=ED=95=9C=EA=B8=80testfile=ED=95=9C=EA=B8=80?=
      =?U";
      filename*1="TF-8?Q?=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=8";
      filename*2="0testfil?=
      =?UTF-8?Q?e=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=E";
      filename*3="D=95=9C?= =?UTF-8?Q?=EA=B8=80=ED=95=9C=EA=B8=80tes?=
      =?UTF-8";
      filename*4="?Q?tfile=ED=95=9C?=
      =?UTF-8?Q?=EA=B8=80=ED=95=9C=EA=B8=80=ED";
      filename*5="=95=9C=EA=B8=80=ED=95=9C=EA=B8=80?=
      =?UTF-8?Q?testfile=ED=95";
      filename*6="=9C=EA=B8=80=ED=95=9C=EA=B8=80?=
      =?UTF-8?Q?=ED=95=9C=EA=B8=8";
      filename*7="0=ED=95=9C=EA=B8=80testfile=ED=95=9C?=
      =?UTF-8?Q?=EA=B8=80=E";
      filename*8="D=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C?=
      =?UTF-8?Q?=EA=";
      filename*9="B8=80testf?=
      =?UTF-8?Q?ile=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=";
      filename*10="80=ED=95=9C=EA=B8=80.txt?="

      When I analyzed the cause, it works normally if MimeUtility.encodeText is not called.
      ex)
      [not working]
      MultiPartEmail Line 467 bodyPart.setFileName(MimeUtility.encodeText(name));

      [normal working]
      MultiPartEmail Line 467 bodyPart.setFileName(name);

      Since I can not modify the MimeUtility source, I think that modifying MultiPartEmail.java is best.

      Can i provide PR on github?

      Thank you.

        Attachments

          Activity

            People

            • Assignee:
              sgoeschl Siegfried Goeschl
              Reporter:
              Simple Lee Jun Gyun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: