You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Seyed Razavi <se...@monkeyx.com> on 2003/12/17 18:37:14 UTC

Character encoding issue

Howdy,

I've got a strange problem with character encoding German characters.
I'm using iso-8859-1.  The app is running on JDK 1.4.2, Jboss 3.2 w/
Tomcat and using Struts 1.1.

The application works fine on local Windows machine and on a Red Hat
system.

However, when moved to a Debian system it behaves strangely ONLY when
accessing Action mappings NOT when accessing JSPs directly.

Accessing a JSP directly shows all messages properly displayed but
accessing it via an Action class (through an ActionForward) shows all
German characters as ?.

The HTML encoding is properly set and all JSP include:

<%@ page contentType="text/html; charset=iso-8859-1"%>
<%@ page pageEncoding="iso-8859-1"%>

I've set the following in the run.sh for Jboss in case it's a system
issue:

export LANG=german
export LC_ALL=de_DE

I don't think it is a system issue because as I said, all JSP when
accessed directly respond properly.  The resource bundle is also
iso-8859-1 encoded.

I'm also setting the Locale on each request to "de" (using the Action
class setLocale method) just in case.  The output from the action
servlet seem to have the correct content-type according to Netscape.

Anybody help?

Cheers,

Seyed


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


RE: Character encoding issue

Posted by Seyed Razavi <se...@monkeyx.com>.
Well to answer my own question: The source of the problem was found.  A
compression filter (gzipping the response) seems to have been the
culprit. 

> -----Original Message-----
> From: Seyed Razavi [mailto:seyed@monkeyx.com] 
> Sent: 17 December 2003 17:37
> To: struts-user@jakarta.apache.org
> Subject: Character encoding issue
> 
> 
> Howdy,
> 
> I've got a strange problem with character encoding German 
> characters. I'm using iso-8859-1.  The app is running on JDK 
> 1.4.2, Jboss 3.2 w/ Tomcat and using Struts 1.1.
> 
> The application works fine on local Windows machine and on a 
> Red Hat system.
> 
> However, when moved to a Debian system it behaves strangely 
> ONLY when accessing Action mappings NOT when accessing JSPs directly.
> 
> Accessing a JSP directly shows all messages properly 
> displayed but accessing it via an Action class (through an 
> ActionForward) shows all German characters as ?.
> 
> The HTML encoding is properly set and all JSP include:
> 
> <%@ page contentType="text/html; charset=iso-8859-1"%>
> <%@ page pageEncoding="iso-8859-1"%>
> 
> I've set the following in the run.sh for Jboss in case it's a system
> issue:
> 
> export LANG=german
> export LC_ALL=de_DE
> 
> I don't think it is a system issue because as I said, all JSP 
> when accessed directly respond properly.  The resource bundle 
> is also iso-8859-1 encoded.
> 
> I'm also setting the Locale on each request to "de" (using 
> the Action class setLocale method) just in case.  The output 
> from the action servlet seem to have the correct content-type 
> according to Netscape.
> 
> Anybody help?
> 
> Cheers,
> 
> Seyed
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


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