[ 
https://issues.apache.org/jira/browse/TRINIDAD-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573019#action_12573019
 ] 

Kenneth tang commented on TRINIDAD-974:
---------------------------------------

IE and Firefox demands different encoding behavior on filename in 
content-disposition header.
IE : URL encoded using UTF-8
FF : RFC2047 (I tested it using UTF-8 and quoted-printable) 

As JSF and Trinidad does not depend on Javamail, we may need to add a local 
copy of MIME encode function into Trinidad.

Please note on two known issues:

1. FF does not work well with open file
Tested using FF 2.0.0.12.  Using the proposed behavior above,
- it works well with "save as", the non-ascii filename can be saved to file 
system successfully
- however, open does not work still.

2. IE has a short length limit.  The total length, including the temp directory 
path + encoded filename, cannot be longer than around 290 bytes.  Considering 
UTF-8 URL encoding is used here, for example one Chinese character will be 
encoded using 9 bytes... So some calculation here...
  Default temp directory path = C:\Documents and Settings\<username>\Local 
Settings\Temporary Internet Files\, it my own env, it takes 80 bytes already.
  290-80/9 ~ 23 Chinese characters max
To make this better, we may use the client side file system encoding to native 
encode the filename in header, for example, using windows-1252.  However, there 
is no easy way to detect this.


> nls: fileDownloadActionListener : mulitibyte char filename is garbled
> ---------------------------------------------------------------------
>
>                 Key: TRINIDAD-974
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-974
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.0.6-core, 1.2.6-core
>            Reporter: Jeanne Waldman
>
> A simple reproducible testcase is to use the
> fileDownloadActionListener.jspx demo and change the filename to be japanese
> or chinese characters and also change your browser's language accordingly.
> On Firefox, it appears fine.
> On IE, the filename is garbled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to