You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by yuan gogo <go...@gmail.com> on 2007/11/29 08:13:43 UTC

enctype="multipart/form-data" cause encoding problem in Chinese!

Hi, folks.
    I'm a Chinese user and using tapestry 5.0.6 + jdk5
    I found setting the form attribute
enctype="multipart/form-data"(when upload a file) will cause text
encoding problem in Chinese.

    Any Idea?

    TIA & best regards!

gogo.yuan

Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by yuan gogo <go...@gmail.com>.
Thank you Chirs.

But I have applied the utf-8 filter several days before, since without
applying utf-8 filter, I got wrong encoding Chinese chars even without
enctype="multipart/form-data".



2007/11/30, Christian Köberl POI <ch...@porsche.co.at>:
>
>
> You will have to set the character encoding in the ServletRequest. Add the
> UTF-8 Filter to your AppModule
> http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
>
> Chris
>
> ps: thanks for the hint - there should be a null check for the
> request.getCharacterEncoding() - I will file a patch
> --
> View this message in context:
> http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14042373
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by Christian Köberl POI <ch...@porsche.co.at>.
You will have to set the character encoding in the ServletRequest. Add the
UTF-8 Filter to your AppModule
http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding

Chris

ps: thanks for the hint - there should be a null check for the
request.getCharacterEncoding() - I will file a patch
-- 
View this message in context: http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14042373
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by yuan gogo <go...@gmail.com>.
Today I download the lastest t5.0.7 snapshot. It seems the patch has
been applied. But another problem arised!

I get the following error: the charset encoding is NULL


java.lang.NullPointerException: charsetName
	java.lang.String.<init>(String.java:442)
	java.lang.String.<init>(String.java:516)
	org.apache.commons.fileupload.disk.DiskFileItem.getString(DiskFileItem.java:349)
	org.apache.tapestry.upload.services.MultipartDecoderImpl.processFileItems(MultipartDecoderImpl.java:117)
	org.apache.tapestry.upload.services.MultipartDecoderImpl.decode(MultipartDecoderImpl.java:65)
	$MultipartDecoder_1168eb00c3b.decode($MultipartDecoder_1168eb00c3b.java)
	$MultipartDecoder_1168eb00bee.decode($MultipartDecoder_1168eb00bee.java)
	org.apache.tapestry.upload.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:40)
	$HttpServletRequestHandler_1168eb00bf0.service($HttpServletRequestHandler_1168eb00bf0.java)
	$HttpServletRequestHandler_1168eb00bed.service($HttpServletRequestHandler_1168eb00bed.java)
	org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:164)



2007/11/29, Christian Köberl POI <ch...@porsche.co.at>:
>
>
>
> yuan gogo wrote:
> >
> > Hasn't this problem been resolved in 5.0.7-snapshot ?
> >
> It was resolved yesterday - so probably it's not in the snapshot build yet
> or you havent got the most recent snapshot.
>
> You could also checkout the 5.0.6 and apply the patch from
> https://issues.apache.org/jira/browse/TAPESTRY-1723 (we're using 5.0.6 in
> production so we had to do this).
>
> We're using a (Maven) classifier to distinguish between the patched and
> unpatched versions (see maven-jar-plugin)
>
> Chris
> --
> View this message in context:
> http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14028577
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by Christian Köberl POI <ch...@porsche.co.at>.

yuan gogo wrote:
> 
> Hasn't this problem been resolved in 5.0.7-snapshot ?
> 
It was resolved yesterday - so probably it's not in the snapshot build yet
or you havent got the most recent snapshot.

You could also checkout the 5.0.6 and apply the patch from
https://issues.apache.org/jira/browse/TAPESTRY-1723 (we're using 5.0.6 in
production so we had to do this). 

We're using a (Maven) classifier to distinguish between the patched and
unpatched versions (see maven-jar-plugin)

Chris
-- 
View this message in context: http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14028577
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by yuan gogo <go...@gmail.com>.
I followed the link and found it has be resolved in 5.0.7 version.
So I downloaded all 5.0.7-snapshot of 28th Nov. After replaced all
5.0.6jars, the problem is still there.
Hasn't this problem been resolved in 5.0.7-snapshot ?

Thank you :-)

2007/11/29, Olof Næssén <ol...@gmail.com>:
>
> Might have something to do with this:
>
> https://issues.apache.org/jira/browse/TAPESTRY-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>
> /Olof
>
> On 29/11/2007, yuan gogo <go...@gmail.com> wrote:
> > Hi, folks.
> >     I'm a Chinese user and using tapestry 5.0.6 + jdk5
> >     I found setting the form attribute
> > enctype="multipart/form-data"(when upload a file) will cause text
> > encoding problem in Chinese.
> >
> >     Any Idea?
> >
> >     TIA & best regards!
> >
> > gogo.yuan
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: enctype="multipart/form-data" cause encoding problem in Chinese!

Posted by Olof Næssén <ol...@gmail.com>.
Might have something to do with this:
https://issues.apache.org/jira/browse/TAPESTRY-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

/Olof

On 29/11/2007, yuan gogo <go...@gmail.com> wrote:
> Hi, folks.
>     I'm a Chinese user and using tapestry 5.0.6 + jdk5
>     I found setting the form attribute
> enctype="multipart/form-data"(when upload a file) will cause text
> encoding problem in Chinese.
>
>     Any Idea?
>
>     TIA & best regards!
>
> gogo.yuan
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org