Author: kcardineaud Date: 2011-07-08 12:23:16 +0200 (Fri, 08 Jul 2011) New Revision: 170 Url: http://nuiton.org/repositories/revision/scmwebeditor/170 Log: Fix a problem with encoding of preview Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java trunk/src/main/webapp/ModificationViewer.jsp trunk/src/main/webapp/Preview.jsp Modified: trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java =================================================================== --- trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-08 07:40:02 UTC (rev 169) +++ trunk/src/main/java/org/nuiton/scmwebeditor/actions/PreviewAction.java 2011-07-08 10:23:16 UTC (rev 170) @@ -59,24 +59,23 @@ if(log.isDebugEnabled()) { log.debug(newText); } - + XMLResponse=""; //Using jrst for generate html document try { XMLResponse = JRST.generate(JRST.TYPE_HTML, newText); if(log.isDebugEnabled()) { log.debug("RST generate"); } + } catch (Exception eee) { if(log.isWarnEnabled()) { log.warn("RST generate fail",eee); } - XMLResponse = "<h4>Parsing error, please read RST specification<h4>"; + XMLResponse = "<h4>Parsing érror, please read RST specification<h4>"; return; } - - } static public PreviewAction getAction() { Modified: trunk/src/main/webapp/ModificationViewer.jsp =================================================================== --- trunk/src/main/webapp/ModificationViewer.jsp 2011-07-08 07:40:02 UTC (rev 169) +++ trunk/src/main/webapp/ModificationViewer.jsp 2011-07-08 10:23:16 UTC (rev 170) @@ -10,7 +10,7 @@ <html> <head> <title>SCMWebEditor</title> - +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <script src="selectLanguage.js"></script> @@ -41,7 +41,7 @@ <link rel="icon" href="img/ScmWebEditor_little.png" type="image/png"> <link rel="stylesheet" type="text/css" href="css/main.css"> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + </head> Modified: trunk/src/main/webapp/Preview.jsp =================================================================== --- trunk/src/main/webapp/Preview.jsp 2011-07-08 07:40:02 UTC (rev 169) +++ trunk/src/main/webapp/Preview.jsp 2011-07-08 10:23:16 UTC (rev 170) @@ -1,5 +1,5 @@ <%@ taglib prefix="s" uri="/struts-tags"%> - + <%@page contentType="text/html" pageEncoding="UTF-8"%> <%--Title and div for rst preview--%> <h3 id="prevtitle" >Preview :</h3>