Georg Sauer-Limbach wrote:
I do not think it is very obvious, that the response class is writing
the characters using the platform's default encoding in this case
Yes. And this is true for many, many places in the
Java library. Always watch out if you see some
String being processed using a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
i liked this article regarding encoding:
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/index.html
i think, it sais all one have to know... (at least in the context of web
apps)
uzi
[EMAIL PROTECTED] wrote:
Georg Sauer-Limbach
uzi wrote:
i liked this article regarding encoding:
http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/index.html
Thanks for the hint. Looks nice.
Cheers,
Heinz
-
To start a new topic, e-mail:
Hi all,
I noticed some encoding problems inside servlets, when switching from
Tomcat 5.5.20 to Tomcat 6.0.10. I looked for it in the mailing lists,
but didn't find something appropriate.
Scenario:
An own servlet (that is: a class derived from HttpServlet) is creating
very simple HTML output,
[EMAIL PROTECTED] wrote:
html,body etc.) just some German special characters (ä ö ü).
sorry for that encoding problem, it should read ä ö ü. I first sent the
message using a different mail address. Then I got a response from the
list server, that I'm not allowed to send messages to this list
[EMAIL PROTECTED] wrote:
Scenario:
An own servlet (that is: a class derived from HttpServlet) is creating
very simple HTML output, containing (beside the necessary HTML tags
html,body etc.) just some German special characters (ä ö ü).
The java source code is UTF-8, the response instance
Is it valid to say charset=UTF-8?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, May 21, 2007 7:51 AM
To: users@tomcat.apache.org
Subject: Encoding in Tomcat 6
Hi all,
I noticed some encoding problems inside servlets, when switching from
Tomcat
Markus Schönhaber wrote:
Works fine for me.
Well, that is really a surprise for me. I tried this in 3 different
operating systems and it was consequently wrong.
You do call response#setContentType before response#getWriter, don't you?
There's no filter changing things?
Well, the code is
Hi,
the question is: How do you create the output of
the servlet, that is, with which Writer or OutputStream.
If you do this:
public void doGet( HttpServletRequest request,
HttpServletResponse response ) throws IOException {
response.setCharacterEncoding( UTF-8 );
[EMAIL PROTECTED] wrote:
Markus Schönhaber wrote:
Works fine for me.
Well, that is really a surprise for me. I tried this in 3 different
operating systems and it was consequently wrong.
That, in turn, doesn't surprise me, since...
You do call response#setContentType before
Markus Schönhaber wrote:
... ServletOutputStream is suitable for writing binary data in the
response as the docs say. If you want to transmit textual data, use
HttpServletResponse#getWriter() (see my question above).
yes, this really is a point, Georg's answer already pointed me to the
right
Georg Sauer-Limbach wrote:
the question is: How do you create the output of
the servlet, that is, with which Writer or OutputStream.
yes you're right: I simply used the output stream.
But if you just obtain the output byte stream of the servlet,
ie by calling
OutputStream outputStream =
12 matches
Mail list logo