[OFBiz] SVN: r4979 - in trunk: base/config
base/src/base/org/ofbiz/base/util
framework/webapp/src/org/ofbiz/webapp/control
jonesde at svn.ofbiz.org
jonesde at svn.ofbiz.org
Tue May 10 08:58:34 EDT 2005
Author: jonesde
Date: 2005-05-10 07:58:26 -0500 (Tue, 10 May 2005)
New Revision: 4979
Modified:
trunk/base/config/ofbiz-containers.xml
trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java
trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
Log:
Some adjustments to better handle character encoding, but could not find reliable solution to the issue for URI parameters; for details on this the text in the Tomcat bug tracker at http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 is helpful for understanding, though not a solution
Modified: trunk/base/config/ofbiz-containers.xml
===================================================================
--- trunk/base/config/ofbiz-containers.xml 2005-05-10 10:49:04 UTC (rev 4978)
+++ trunk/base/config/ofbiz-containers.xml 2005-05-10 12:58:26 UTC (rev 4979)
@@ -129,7 +129,7 @@
<property name="redirectPort" value=""/>
<property name="scheme" value="http"/>
<property name="secure" value="false"/>
- <property name="URIEncoding" value="ISO-8859-1"/>
+ <property name="URIEncoding" value="UTF-8"/>
<property name="useBodyEncodingForURI" value="false"/>
<property name="xpoweredBy" value="true"/>
<!-- AJP/13 connector attributes -->
@@ -155,7 +155,7 @@
<property name="redirectPort" value=""/>
<property name="scheme" value="http"/>
<property name="secure" value="false"/>
- <property name="URIEncoding" value="ISO-8859-1"/>
+ <property name="URIEncoding" value="UTF-8"/>
<property name="useBodyEncodingForURI" value="false"/>
<property name="xpoweredBy" value="true"/>
<!-- HTTP connector attributes -->
@@ -193,7 +193,7 @@
<property name="redirectPort" value=""/>
<property name="scheme" value="https"/>
<property name="secure" value="true"/>
- <property name="URIEncoding" value="ISO-8859-1"/>
+ <property name="URIEncoding" value="UTF-8"/>
<property name="useBodyEncodingForURI" value="false"/>
<property name="xpoweredBy" value="true"/>
<!-- HTTP connector attributes -->
Modified: trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java
===================================================================
--- trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java 2005-05-10 10:49:04 UTC (rev 4978)
+++ trunk/base/src/base/org/ofbiz/base/util/UtilHttp.java 2005-05-10 12:58:26 UTC (rev 4979)
@@ -99,6 +99,7 @@
value = Arrays.asList(paramArr);
} else {
value = paramArr[0];
+ // does the same thing basically, nothing better about it as far as I can see: value = request.getParameter(name);
}
}
paramMap.put(name, value);
Modified: trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
===================================================================
--- trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java 2005-05-10 10:49:04 UTC (rev 4978)
+++ trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java 2005-05-10 12:58:26 UTC (rev 4979)
@@ -95,6 +95,8 @@
String charset = getServletContext().getInitParameter("charset");
if (charset == null || charset.length() == 0) charset = request.getCharacterEncoding();
if (charset == null || charset.length() == 0) charset = "UTF-8";
+ Debug.logInfo("The character encoding of the request is: [" + request.getCharacterEncoding() + "]. The character encoding we will use for the request and response is: [" + charset + "]", module);
+
if (!"none".equals(charset)) {
request.setCharacterEncoding(charset);
}
More information about the Svn
mailing list