|
From: Nicolas C. <ni...@nu...> - 2008-10-06 10:27:28
|
Hi everyone,
I need some advice on i18n issues.
I have a JSON producer:
@GET
@Path("/stream")
@Produces("application/json;charset=UTF-8")
public Stream getMyStreamJson() {
Stream stream = ...;
return stream;
}
who's outcome is:
{"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
If I get the url directly in firefox (http://localhost/stream), the downloaded file is correct.
But my client (ExtJS) see extraneous characters:
{"stream":{"activities":[{"id":9,"title":"A title with � and �����"}]}}
The header of the response are:
Server Apache-Coyote/1.1
Content-Type application/json;charset=UTF-8
Transfer-Encoding chunked
Date Mon, 06 Oct 2008 08:26:45 GMT
If I develop a single JSP:
<%@page contentType="application/json;charset=UTF-8" %>
{"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
All goes well, but the headers are:
Server Apache-Coyote/1.1
Content-Type application/json;charset=UTF-8
Content-Language es
Content-Length 2294
Date Mon, 06 Oct 2008 08:25:30 GMT
There are any special needs to work with internationalizated content or I am missing some configuration?
Thanks in advance,
Nicolás. |