Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-174

charset ignored when unmarshalling strings

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • RC 1
    • Beta 9
    • None
    • None

      Hi,

      the default content marshalling for java.lang.String in the Provider org.jboss.resteasy.plugins.providers.StringTextStar is done without specifying the charset. I have spent some time today searching for a bug in my application which behaved differently depending on the plattform which is because the plattform's default encoding is used.

      Would it make sense for the StringTextStar Provider to use the charset as specified in @Consumes or @Produces (e.g. "application/xml; charset=UTF-8")? Of course, I could use the InputStreamProvider and take care of the encoding but that's not convenient compared to working with Strings. For now I have just changed my plattform's default encoding.

      Thanks,
      Christian

              patriot1burke@gmail.com Bill Burke (Inactive)
              patriot1burke@gmail.com Bill Burke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: