You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Fabio Heer (Jira)" <ji...@apache.org> on 2020/01/16 17:32:00 UTC

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

    [ https://issues.apache.org/jira/browse/EMAIL-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17017327#comment-17017327 ] 

Fabio Heer commented on EMAIL-189:
----------------------------------

This is a duplication of EMAIL-138

> 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
>            Priority: Major
>             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
(v8.3.4#803005)