Hi Alistair,
> I've been experimenting with posting in Unicode-based XML content (UTF-8 
> encoded Chinese characters as it happens) to a JAX-RS resource. The content 
> parameter to the resource method is a String and so the content from a post 
> is ultimately read in with the 
> org.restlet.ext.jaxrs.internal.provider.StringProvider. Unfortunately the 
> non-ASCII characters come through garbled.
>
> Digging around the StringProvider class, the problem looks to be with the 
> Util.copyToStringBuilder method - it reads in the content a single byte at a 
> time but then casts each byte to a char. The implication is that each 
> character is one byte which, of course, for UTF-8 encoded characters is 
> incorrect.
>   
Yes, this seems to be a bug. Please create an issue on 
http://restlet.tigris.org/servlets/ProjectIssues
Could you create and attach a patch to this issue?

thank you
   Stephan

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2626234

Reply via email to