Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA0AACC1F for ; Mon, 26 May 2014 05:20:01 +0000 (UTC) Received: (qmail 46252 invoked by uid 500); 26 May 2014 05:20:01 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 46220 invoked by uid 500); 26 May 2014 05:20:01 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 46212 invoked by uid 99); 26 May 2014 05:20:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 05:20:01 +0000 Date: Mon, 26 May 2014 05:20:01 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (WW-4352) xslt result and utf-8 characters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4352?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Lukasz Lenart updated WW-4352: ------------------------------ Fix Version/s: 2.3.18 > xslt result and utf-8 characters > -------------------------------- > > Key: WW-4352 > URL: https://issues.apache.org/jira/browse/WW-4352 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions, Other > Affects Versions: 2.3.16 > Environment: windows 7 > Reporter: Arturo Flores > Fix For: 2.3.18 > > > copied from email in mailing list: > I have the following in my struts.xml > > > utf8 > testxml.xsl > > > My testxml.xsl file looks like this: > > xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"> > > > > > > My TestXML.java file looks has the following > public Class TestXml { > private String utf8=3D"h=C3=A8llo world"; // a string with utf-8 charac= ter, getters+setters omitted here > =20 > public String execute throws Exception { > return "success"; > } > } > When I request /testutf8 I get the following in the browser: > XML Parsing Error: not well-formed > Location: http://localhost:8080/testutf8 > Line Number 1, Column 48:h=EF=BF=BDllo world > -----------------------------------------------^ > It seems the utf-8 character is not being handled properly. How can I ma= ke the xslt result type handle the utf-8 character correctly? =20 > Upon further investigation, the response type header is only "text/xml", = it is missing character encoding. =20 > A workaround is to register a custom filter which forces utf-8 character = encoding on the output, but ideally this should be handled within struts. > Let me know if more information is needed. -- This message was sent by Atlassian JIRA (v6.2#6252)