I use <s:upload> tag to upload one file,whose name contains some Chinese charaters.
something interesting happens.
Our project's encoding is set to be UTF-8.
My partner deploys the project in simplified Chinese windows xp whose local encoding is GBK.When he upload one file,whose name contains some Chinese charaters,he get the file name unrecognised in the program.
While I deploy the project in the ubuntu7.04,whose local encoding is UTF-8.I just do the same things,but everything is fine.
The <s:upload> tag that we use as below
<s:fileUpload data="#{attachment.data}" contentType="#{attachment.contentType}" fileName="#{attachment.name}" style="width:100;" />
case HEADERS: { if (checkSequence(buffer, i, CR_LF)) { parseParams(new String(buffer, pos, i - pos - 1), ";", headers);
if(encoding==null) parseParams(new String(buffer, pos, i - pos - 1), ";", headers); else parseParams(new String(buffer, pos, i - pos - 1,encoding), ";", headers);
I've committed this to CVS, thanks for the patch.