You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Luc Santeramo <lu...@univ-avignon.fr> on 2002/09/02 16:36:11 UTC

Tomcat/Mysql/Woody

Hi,

I'm sorry, I'm new to this mailing list, and I didn't find any post in the 
archive about this subject....or I don't know how to search.

I've got a problem since I upgraded from debian potato to debian woody.
the following jsp file doesn't display the same thing on the different 
debian distro.
it just extract data from a mysql database.

---------------------------------------------------------
<%@ page import="java.sql.*" %>
<%
String connectionURL = 
"jdbc:mysql://localhost:3306/dbname?user=dbuser&password=xxxxxxx";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>

<html>
  <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  </head>
hé hé hé

<body>
<%
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "", "");
statement = connection.createStatement();
rs = statement.executeQuery("SELECT * FROM xxxxxxx");

while (rs.next()) {
out.println(rs.getString("description")+"<br>");
}

rs.close();
%>

</body></html>
---------------------------------------------------------


this jsp displays, on the potato box :
--------------------------
hé hé hé
Revue d'histoire consacrée à la période de la Révolution française et de 
l'Empire.
...
--------------------------

the same jsp displays, on the woody box :
--------------------------
hé hé hé
Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de 
l'Empire.
...
--------------------------

as you can see, french special characters are now "?" when they are 
extracted from the mysql DB.
but if I check the mysql manually or with phpmyadmin, french character are 
still there !!!!!

I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems
same config files !

if anybody has a clue .....
thanks a lot

Luc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Mysql/Woody

Posted by Luc Santeramo <lu...@univ-avignon.fr>.
thanks Stefan for the idea
but the problem is somewhere else.
the problem comes from java
just have to define CATALINA_OPTS="-Dfile.encoding=iso8859-1"
before starting tomcat

hope that will help other persons..

Thanks to Loic....

Luc

At 10:15 03/09/2002  +0200, you wrote:
>Just an idea but maybe the font you are using on Woody is unable to display
>the special characters and replaces them instead with a '?'.
>
>Stefan Langer
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Mysql/Woody

Posted by Luc Santeramo <lu...@univ-avignon.fr>.
At 10:15 03/09/2002  +0200, you wrote:
>Just an idea but maybe the font you are using on Woody is unable to display
>the special characters and replaces them instead with a '?'.

actually, I use internet explorer to see the result of the query
If I do the same query using phpmyadmin with apache, I can see the french 
characters !!!
strange isn't it ? :)

Luc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat/Mysql/Woody

Posted by Stefan Langer <ma...@web.de>.
Just an idea but maybe the font you are using on Woody is unable to display
the special characters and replaces them instead with a '?'.

Stefan Langer



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat/Mysql/Woody

Posted by Luc Santeramo <lu...@univ-avignon.fr>.
At 15:10 03/09/2002  +1000, you wrote:
>On Mon, Sep 02, 2002 at 04:36:11PM +0200, Luc Santeramo wrote:
>...
> > this jsp displays, on the potato box :
> > --------------------------
> > hé hé hé
> > Revue d'histoire consacrée à la période de la Révolution française et de
> > l'Empire.
> > ...
> > --------------------------
> >
> > the same jsp displays, on the woody box :
> > --------------------------
> > hé hé hé
> > Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de
> > l'Empire.
> > ...
> > --------------------------
> >
> > as you can see, french special characters are now "?" when they are
> > extracted from the mysql DB.
> > but if I check the mysql manually or with phpmyadmin, french character are
> > still there !!!!!
> >
> > I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems
> > same config files !
> >
> > if anybody has a clue .....
>
>Probably your system locale changed. If you type 'locale', what does it
>show? You can run 'dpkg-reconfigure locale' as root to configure
>installed locales and set a default.
well, I tried to
I set up FR_fr iso 8859 1
but did not change anything

this is what I got on the 2 different boxes :
woody box:~# locale
LANG=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

potato box:~# locale
LANG=POSIX
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_ALL=


I know something has changed but I can't find what !!!!

for the moment I'm lost....

Thx

Luc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat/Mysql/Woody

Posted by Jeff Turner <je...@apache.org>.
On Mon, Sep 02, 2002 at 04:36:11PM +0200, Luc Santeramo wrote:
...
> this jsp displays, on the potato box :
> --------------------------
> hé hé hé
> Revue d'histoire consacrée à la période de la Révolution française et de 
> l'Empire.
> ...
> --------------------------
> 
> the same jsp displays, on the woody box :
> --------------------------
> hé hé hé
> Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de 
> l'Empire.
> ...
> --------------------------
> 
> as you can see, french special characters are now "?" when they are 
> extracted from the mysql DB.
> but if I check the mysql manually or with phpmyadmin, french character are 
> still there !!!!!
> 
> I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems
> same config files !
> 
> if anybody has a clue .....

Probably your system locale changed. If you type 'locale', what does it
show? You can run 'dpkg-reconfigure locale' as root to configure
installed locales and set a default.

--Jeff

> thanks a lot
> 
> Luc

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>