tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikola Milutinovic" <Nikola.Milutino...@ev.co.yu>
Subject Re: Character Encoding
Date Mon, 01 Apr 2002 09:07:07 GMT
> I have used: request.setCharacterEncoding("ISO-8859-1"); and when I want to display the
following line (in Danish):
> "Sjclland og Rerne"

Is it supposed to be "ISO-8859-1", in the first place? Danish should be in the Latin-1 subset,
AFAIK.

Also, why are you setting "request" and complaining on what is displayed (which is correlated
to "response" object)?

> I get these results:
> Mozilla (Linux OS):    "Sjclland og Rerne"
> Netscape (Windows OS):    "Sjclland og Rerne"
> Explorer (Windows OS):    "Sj├Żlland og ├Żerne"

> The data are fetched from a PostgreSQL DB Server encoded to LATIN1. When I am using the
data
> from DB directly within my JSP pages there are no problems. It is only when I am using
the parameters
> received from other pages I see the problem with the character encoding.

One thing that might be bugging you is the encoding of the HTML document. Is it se to ISO-8859-1?
Your page should look something like this:

<%@ page
  contentType="text/html; charset=ISO-8859-1"
%>
...
<html>
<head>
  <title>Test</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  ...
</head>
...

Nix.
Mime
View raw message