tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikola Milutinovic" <>
Subject Re: Tomcat & Velocity Native language configuration problems
Date Wed, 21 Nov 2001 08:06:15 GMT
> Hello,
> I am using tomcat and velocity on Debian box. My servlets gets data from
> postgresql database and merges it with velocity template. After merging I
> see '?' instead of national characters. But if the same characters are used
> in template body, then they are displayed correctly. The problem is only
> with data I got from database. In database there are lithuanian characters
> (encoding iso-8859-13). I thing there is something wrong with configuration.
> in file i have:
> input.encoding=iso-8859-13
> output.encoding=iso-8859-13
> but it looks like that these settings are only used for template, not for
> merged data.

I've had that trouble with my setup of PostgreSQL. My mistake was that the database was created
without specifying the encoding. The data was Win-CP1250 encoded, so you can imagine the mess
it made. When I created another database with proper encoding it was all OK. I'm not saying
this is your problem, but it could be.

Anyway, those '?' are not from Tomcat or Velocity, but from JDBC driver. Write a simple Java
standalone application and retrieve a couple of rows and you'll see those '?' again.

Since I could use Win-CP1250 encoded data with Win-1250 declaration of the HTML in JSP page,
I found that there was a quick-n-dirty *temporary* fix for the problem. I used the following
connection URL:


That spitted out the characters unchanged. I know it is bad and I'll fix it ASAP, when I find
some time.

View raw message