You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Hans Wichman <ha...@trimm.nl> on 2003/08/13 10:24:06 UTC

question marks appearing after deploy to production server

Hi,
I have a strange problem, I wrote a servlet that retrieves some data from a 
database, which may contains characters such as ë.

On my local tomcat 4.1.24 testserver the output shows correctly as in 'aërobe'.
However if I deploy the application to one of our testservers, the result 
is 'a?robe'.

Does anybody have a clue how this may happen?

regards,
Hans


RE: question marks appearing after deploy to production server

Posted by Tom Lyle <to...@limehouse.co.uk>.
This could be to do with the character encoding setting in your jdbc driver.
Are you connecting to the same database on your testserver as on your
localmachine? Are you obtaining a Connection object in a different way?

> -----Original Message-----
> From: Mark Schmeets [mailto:mark@chipware.com]
> Sent: 13 August 2003 14:40
> To: Tomcat Users List
> Subject: Re: question marks appearing after deploy to production server
>
>
> Hans Wichman wrote:
>
> > Hi,
> > I have a strange problem, I wrote a servlet that retrieves some data
> > from a database, which may contains characters such as ë.
> >
> > On my local tomcat 4.1.24 testserver the output shows correctly as in
> > 'aërobe'.
> > However if I deploy the application to one of our testservers, the
> > result is 'a?robe'.
> >
> > Does anybody have a clue how this may happen?
> >
> > regards,
> > Hans
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> It is almost certainly a characterset problem. You can specify the
> characterset when you set the content type, and Tomcat will create an
> OutputStreamWriter ( to create the PrintWriter ) with that characterset.
> Or if you are creating the PrintWriter yourself, specify the correct
> encoding.
> Another thing to check is the characterset in your database. You want to
> make sure this matches.
>
> Hope this helps.
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


RE: question marks appearing after deploy to production server

Posted by Tom Lyle <to...@limehouse.co.uk>.
This could be to do with the character encoding setting in your jdbc driver.
Are you connecting to the same database on your testserver as on your
localmachine? Are you obtaining a Connection object in a different way?

> -----Original Message-----
> From: Mark Schmeets [mailto:mark@chipware.com]
> Sent: 13 August 2003 14:40
> To: Tomcat Users List
> Subject: Re: question marks appearing after deploy to production server
>
>
> Hans Wichman wrote:
>
> > Hi,
> > I have a strange problem, I wrote a servlet that retrieves some data
> > from a database, which may contains characters such as ë.
> >
> > On my local tomcat 4.1.24 testserver the output shows correctly as in
> > 'aërobe'.
> > However if I deploy the application to one of our testservers, the
> > result is 'a?robe'.
> >
> > Does anybody have a clue how this may happen?
> >
> > regards,
> > Hans
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> It is almost certainly a characterset problem. You can specify the
> characterset when you set the content type, and Tomcat will create an
> OutputStreamWriter ( to create the PrintWriter ) with that characterset.
> Or if you are creating the PrintWriter yourself, specify the correct
> encoding.
> Another thing to check is the characterset in your database. You want to
> make sure this matches.
>
> Hope this helps.
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: question marks appearing after deploy to production server

Posted by Mark Schmeets <ma...@chipware.com>.
Hans Wichman wrote:

> Hi,
> I have a strange problem, I wrote a servlet that retrieves some data 
> from a database, which may contains characters such as ë.
>
> On my local tomcat 4.1.24 testserver the output shows correctly as in 
> 'aërobe'.
> However if I deploy the application to one of our testservers, the 
> result is 'a?robe'.
>
> Does anybody have a clue how this may happen?
>
> regards,
> Hans
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
It is almost certainly a characterset problem. You can specify the 
characterset when you set the content type, and Tomcat will create an 
OutputStreamWriter ( to create the PrintWriter ) with that characterset. 
Or if you are creating the PrintWriter yourself, specify the correct 
encoding.
Another thing to check is the characterset in your database. You want to 
make sure this matches.

Hope this helps.
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: question marks appearing after deploy to production server

Posted by Mark Schmeets <ma...@chipware.com>.
Hans Wichman wrote:

> Hi,
> I have a strange problem, I wrote a servlet that retrieves some data 
> from a database, which may contains characters such as ë.
>
> On my local tomcat 4.1.24 testserver the output shows correctly as in 
> 'aërobe'.
> However if I deploy the application to one of our testservers, the 
> result is 'a?robe'.
>
> Does anybody have a clue how this may happen?
>
> regards,
> Hans
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
It is almost certainly a characterset problem. You can specify the 
characterset when you set the content type, and Tomcat will create an 
OutputStreamWriter ( to create the PrintWriter ) with that characterset. 
Or if you are creating the PrintWriter yourself, specify the correct 
encoding.
Another thing to check is the characterset in your database. You want to 
make sure this matches.

Hope this helps.
Mark