Any help to resolve this issue is most welcome.

I created a small HelloWorldPortlet which includes a jsp page

        public class HelloWorldPortlet extends GenericPortlet {
            protected void doView(RenderRequest request, 
                            RenderResponse response) throws PortletException, 
                                                                  IOException {
                response.setContentType("text/html; charset=UTF-8");
                
//this.getPortletContext().getRequestDispatcher("/greet").include(request, 
response);
                  
this.getPortletContext().getRequestDispatcher("/msg.jsp").include(request, 
response);
            }
        }
The jsp page msg.jsp outputs a string in unicode:
        <%@ page contentType="text/html;charset=UTF-8"%>
        <p>Hello Portlet. 
        <% String s = "\u0645\u0631\u062d\u0628\u0627"; %>
        <br/>Printing Unicode from jsp : <%=s%>
        <br/>
        <% out.println("file.encoding = " + 
System.getProperty("file.encoding")); %>
        </p>

I am using Pluto-1.1.5 as driver to render the portlet and the unicode string 
is not being displayed as expected. The String is text in Arabic language. It 
seems that Pluto is converting the string to Cp1252 encoding.

The same text is rendered fine if we include a servlet which outputs this text 
instead of a jsp.
        public class Greet extends HttpServlet {
            private static final String CONTENT_TYPE = "text/html; 
charset=UTF-8";
            public void init(ServletConfig config) throws ServletException {
                super.init(config);
            }
        
            public void doGet(HttpServletRequest request, 
                              HttpServletResponse response) throws 
ServletException, IOException        {                                          
       response.setContentType(CONTENT_TYPE);
                PrintWriter out = response.getWriter();
                out.println("Printing Unicode from servlet : " + 
"\u0627\u0646\u062a\u0647\u0627\u0621");
                out.close();
            }
        }



Best Regards,

Naresh Shorey

Reply via email to