You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Maciej Ko³odziej <Ma...@comarch.pl> on 2001/12/28 16:02:38 UTC
Problem with iso-8859-2 charset
Hi,
I'm using Tomcat 3.3 on Linux Debian unstable system. Everything was
fine until I made an upgrade of the distribution. Now all iso-8859-2
chars are returned as two-byte values (Unicode?), and I can see
question marks and squares instead of letters. Does anyone have an
idea what can it be? Configuration problem? Same jsp pages worked fine
before the upgrade.
--
Best regards,
Maciej
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Problem with iso-8859-2 charset
Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Maciej Ko³odziej wrote:
> Hi,
>
> In Your mail sent Wednesday, January 02, 2002 I wrote:
>
> MK> I'm using Tomcat 3.3 on Linux Debian unstable system. Everything was
> MK> fine until I made an upgrade of the distribution. Now all iso-8859-2
> MK> chars are returned as two-byte values (Unicode?), and I can see
> MK> question marks and squares instead of letters. Does anyone have an
> MK> idea what can it be? Configuration problem? Same jsp pages worked fine
> MK> before the upgrade.
To what version?
> I found some new interesting information about this behavior:
>
> First, in case described above, if I choose Encoding->UTF-8 in my
> browser everything looks fine.
> That means, that Tomcat(?) converts chars from iso-8859-2 in .jsp file
> to unicode on the server output. So setting the page charset to utf-8
> in <meta> should work.
So, Tomcat is just plain spitting it out. It is a bit strange that it should
print it as UTF-8. My understanding is that, if not specified, Tomcat will use
default JVM character encoding to convert the output. The default is, usually,
ISO-8859-1.
This is usually derived from UNIX "locale" environment.
> Second, I found, that if I use a <bean:message .../> tag to insert
> text from properties file and the text contains polish characters
> entered in unicode (like \u0105) then the encoding on the output is
> back iso-8859-2, so there is conversion, but in this case from Unicode
> to iso-8859-2 (browser is set to iso-8859-2).
>
> So the problem is partially solved, because I can choose one of these
> solutions to get desirable result. But I'm just curious - what can be
> the cause of that?
Have you set JSP page output encoding properly? I found out that my troubles
were caused by "misinterpreting" JSP specification - "pageEncoding" atribute
doesn't do the job, I had to use "contentType" instead. So, something like this
should work:
<%@ page
info="Test page"
contentType="text/html; charset=iso-8859-2"
%><%!
...
%><%
...
%><html>
<head>
<title>Test page</title>
<meta http-equiv="Content-Type" value="text/html; charset=iso-8859-2">
</head>
<body>
...
</body>
</html>
Nix.
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Problem with iso-8859-2 charset
Posted by Maciej Ko³odziej <Ma...@comarch.pl>.
Hi,
In Your mail sent Wednesday, January 02, 2002 I wrote:
MK> I'm using Tomcat 3.3 on Linux Debian unstable system. Everything was
MK> fine until I made an upgrade of the distribution. Now all iso-8859-2
MK> chars are returned as two-byte values (Unicode?), and I can see
MK> question marks and squares instead of letters. Does anyone have an
MK> idea what can it be? Configuration problem? Same jsp pages worked fine
MK> before the upgrade.
I found some new interesting information about this behavior:
First, in case described above, if I choose Encoding->UTF-8 in my
browser everything looks fine.
That means, that Tomcat(?) converts chars from iso-8859-2 in .jsp file
to unicode on the server output. So setting the page charset to utf-8
in <meta> should work.
Second, I found, that if I use a <bean:message .../> tag to insert
text from properties file and the text contains polish characters
entered in unicode (like \u0105) then the encoding on the output is
back iso-8859-2, so there is conversion, but in this case from Unicode
to iso-8859-2 (browser is set to iso-8859-2).
So the problem is partially solved, because I can choose one of these
solutions to get desirable result. But I'm just curious - what can be
the cause of that?
--
Best regards,
Maciej
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
RE: Problem with iso-8859-2 charset
Posted by thanaa <th...@infocomcorp.com>.
Hello,
Dear Maciej, I am new user to tomcat and I am using the same version 3.3
on linux also, I need to configure apache and tomcat to work together,
and I am failed, would you please direct me to any documentation that
can be helpful.
Also, I am using binary version of tomcat, do I need to use rpm for
linux?
Please reply to me.
Thank you.
-----Original Message-----
From: Maciej Ko³odziej [mailto:Maciej.Kolodziej@comarch.pl]
Sent: Friday, December 28, 2001 9:03 AM
To: tomcat-user@jakarta.apache.org
Subject: Problem with iso-8859-2 charset
Hi,
I'm using Tomcat 3.3 on Linux Debian unstable system. Everything was
fine until I made an upgrade of the distribution. Now all iso-8859-2
chars are returned as two-byte values (Unicode?), and I can see
question marks and squares instead of letters. Does anyone have an
idea what can it be? Configuration problem? Same jsp pages worked fine
before the upgrade.
--
Best regards,
Maciej
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>