Index: src/main/java/com/xpn/xwiki/web/XWikiServletRequest.java
===================================================================
--- src/main/java/com/xpn/xwiki/web/XWikiServletRequest.java	(revision 10079)
+++ src/main/java/com/xpn/xwiki/web/XWikiServletRequest.java	(working copy)
@@ -34,9 +34,7 @@
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
 import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Map;
+import java.util.*;
 
 import com.xpn.xwiki.util.Util;
 
@@ -47,8 +45,54 @@
         this.request = request;
     }
 
+    /**
+     * Filtering for some common non ISO-8859-1 characters
+     * This filtering works on Tomcat (not Jetty)
+     * @param text
+     * @return
+     */
+    public String filterString(String text) {
+        if (text==null)
+            return null;
+
+        // In case we are running in ISO we need to take care or some windows-1252 characters
+        // that are commonly copy pasted by users from web sites or desktop applications
+        // If we don't transform these characters then some databases running in the latin charset mode
+        // we drop the characters and will we only see that on server restart.
+        // This happens for example using MySQL both with tomcat and Jetty
+        // See bug http://jira.xwiki.org/jira/browse/XWIKI-2422
+        // TODO: see if this is also needed in PORTLET MODE
+        if (request.getCharacterEncoding().startsWith("ISO-8859")) {
+            text = text.replaceAll("\u0080", "&euro;");
+            text = text.replaceAll("\u0091", "'");
+            text = text.replaceAll("\u0092", "'");
+            text = text.replaceAll("\u0093", "\"");
+            text = text.replaceAll("\u0094", "\"");
+            text = text.replaceAll("\u0084", "\"");
+            text = text.replaceAll("\u0098", "\"");
+            text = text.replaceAll("\u0099", "&trade;");
+            text = text.replaceAll("\u009c", "&#156;");
+            text = text.replaceAll("\u008b", "'");
+            text = text.replaceAll("\u009b", "'");
+            text = text.replaceAll("\u0085", "...");
+            text = text.replaceAll("\u0096", "-");
+            text = text.replaceAll("\u0097", "-");
+        }
+        return text;
+    }
+
+    public String[] filterStringArray(String[] text) {
+        if (text==null)
+         return null;
+
+        for (int i=0;i<text.length;i++) {
+            text[i] = filterString(text[i]);
+        }
+        return text;
+    }
+
     public String get(String name) {
-        return request.getParameter(name);
+        return filterString(request.getParameter(name));
     }
 
     public HttpServletRequest getHttpServletRequest() {
@@ -195,7 +239,7 @@
     }
 
     public String getParameter(String s) {
-        return request.getParameter(s);
+        return filterString(request.getParameter(s));
     }
 
     public Enumeration getParameterNames() {
@@ -203,11 +247,25 @@
     }
 
     public String[] getParameterValues(String s) {
-        return request.getParameterValues(s);
+        String[] origResult = request.getParameterValues(s);
+        return filterStringArray(origResult);
     }
 
     public Map getParameterMap() {
-        return request.getParameterMap();
+        Map newMap = new HashMap();
+        Map map = request.getParameterMap();
+        Iterator it = map.keySet().iterator();
+        while (it.hasNext()) {
+           String key = (String) it.next();
+           Object value = map.get(key);
+           if (value instanceof String)
+             newMap.put(key, filterString((String) value));
+           else if (value instanceof String[])
+             newMap.put(key, filterStringArray((String[]) value));
+           else
+             newMap.put(key, value);
+        }
+        return map;
     }
 
     public String getProtocol() {
Index: src/main/java/com/xpn/xwiki/web/XWikiAction.java
===================================================================
--- src/main/java/com/xpn/xwiki/web/XWikiAction.java	(revision 10079)
+++ src/main/java/com/xpn/xwiki/web/XWikiAction.java	(working copy)
@@ -111,6 +111,17 @@
                 Utils.prepareContext(mapping.getName(), request, response,
                     new XWikiServletContext(servlet.getServletContext()));
 
+            // This code is already called by struts.
+            // However struts will also set all the parameters of the form data
+            // directly from the request objects.
+            // However because of bug http://jira.xwiki.org/jira/browse/XWIKI-2422
+            // We need to perform encoding of windows-1252 chars in ISO mode
+            // So we need to make sure this code is called
+            // TODO: completely get rid of struts so that we control this part of the code and can reduce drastically the number of calls
+            if (form != null) {
+                form.reset(mapping, request);
+            }
+
             // Add the form to the context
             context.setForm((XWikiForm) form);
             XWiki xwiki = null;
Index: src/main/java/com/xpn/xwiki/web/XWikiPortletRequest.java
===================================================================
--- src/main/java/com/xpn/xwiki/web/XWikiPortletRequest.java	(revision 10079)
+++ src/main/java/com/xpn/xwiki/web/XWikiPortletRequest.java	(working copy)
@@ -41,6 +41,9 @@
 
 import com.xpn.xwiki.util.Util;
 
+// TODO: see if the patch http://jira.xwiki.org/jira/browse/XWIKI-2422
+// is also needed in PORTLET MODE
+
 public class XWikiPortletRequest implements XWikiRequest {
     protected final Log logger = LogFactory.getLog(getClass());
     public static final String ROOT_SPACE_PREF_NAME = "rootSpace";
@@ -54,6 +57,7 @@
         return request;
     }
 
+    
     public String get(String name) {
         return request.getParameter(name);
     }
