Bill,
    Thanks for pointing that out. I actually found it while I was digging
through a bunch of the code. I finally figured out what the problem was.
The default setting for that piece works great and I was able to override
it. However, the garbled text actually comes up at the point where mime4j
is invoked to parse the message. So, as a quick test, I downloaded the
sources for mime4j 0.6 and changed everything to do UTF-8 instead of
us-ascii and changed content transfer encoding from 7bit to 8bit. I used
that jar by excluding the mime4j dependency for the resteasy multipart
provider and now everything works fine. I honestly don't know if this will
have side effects and it's not the right way to do things. I'll have the
clients send the correct charset, but for now I'll have to deal with this
solution until all the old versions of our app have disappeared from our
analytics.

thanks for your help!

On Tue, Jun 26, 2012 at 3:09 PM, Bill Burke <bbu...@redhat.com> wrote:

> Can you specify your method signature?
>
> Maybe this helps?
>
>
> http://docs.jboss.org/resteasy/docs/2.3.4.Final/javadocs/org/jboss/resteasy/plugins/providers/multipart/InputPart.html#DEFAULT_CONTENT_TYPE_PROPERTY
>
>
> On 6/26/12 3:14 PM, Adrian Rodriguez wrote:
> > We have an iOS application that is sending multipart/form-data requests.
> > Two of the strings in the payload don't contain a character set so by
> > the time it gets to my @POST method, the values are garbled up. I looked
> > at the input part to see what was going on. The charset is set to
> > us-ascii. Is there any way to read the raw data and decode it using
> > utf-8?  For
> > example, formDataMap.get("lastName").get(0).getBodyAsString() ... how
> > can I achieve something similar but have it decode using utf-8 instead
> > of us-ascii? Ultimately, the iOS app should end up sending the correct
> > charset over, but that pretty much puts us at two weeks until this is
> > "fixed" since Apple takes about 2 weeks to approve our updates. I'm
> > hoping there is something I can do similar to what I did with regular
> > form-url-encoded requests where I used a servlet filter to force the
> > character encoding to utf-8.
> >
> > Any help would be great!
> >
> > <adrian />
> >
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >
> >
> >
> > _______________________________________________
> > Resteasy-users mailing list
> > Resteasy-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/resteasy-users
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to