You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Lee Jun Gyun (JIRA)" <ji...@apache.org> on 2019/08/05 08:56:00 UTC

[jira] [Created] (EMAIL-189) if Korean language is included in attachment file name, attachment file name is broken.

Lee Jun Gyun created EMAIL-189:
----------------------------------

             Summary: if Korean language is included in attachment file name, attachment file name is broken.
                 Key: EMAIL-189
                 URL: https://issues.apache.org/jira/browse/EMAIL-189
             Project: Commons Email
          Issue Type: Bug
            Reporter: Lee Jun Gyun
             Fix For: 1.5


 
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.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)