Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 60173 invoked from network); 28 Jan 2003 16:20:01 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 28 Jan 2003 16:20:01 -0000 Received: (qmail 4590 invoked by uid 97); 28 Jan 2003 16:21:13 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 4511 invoked by uid 97); 28 Jan 2003 16:21:12 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 4495 invoked by uid 98); 28 Jan 2003 16:21:11 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <03ea01c2c6e9$53ea5160$a60aa8c0@aqureshi> From: "Affan Qureshi" To: "struts-user" , Subject: Re: AW: Transforming a String to valid HTML encoding Date: Tue, 28 Jan 2003 21:21:29 +0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I was facing the same problem in displaying the copyright and trademark symbols. Did you find some solution for this? I shall be greatfeul if you can share you experience with me. What I did was I created a utility class which transforms special characters into their HTML encodings and also decodes the same. But Struts transforms them again e.g if I encode ˱ for one symbol Struts will encode the '&' to & and hence my effort to encode will not work because my symbol would become &#753. Now either I want to know if I can turn the ResponseUtils.filter OFF or I can have it filter for my characters too (it currently only filters 4 characters). BTW I cam not talking about URL encoding here. I am talking about HTML encoding for my forms and otherwise. Thanks, Affan ----- Original Message ----- From: "Hirschmann, Bernhard" To: "'Struts Users Mailing List'" Sent: Wednesday, January 15, 2003 2:16 PM Subject: AW: AW: Transforming a String to valid HTML encoding Thank you for your help, Craig. I don't know if you got me completely right.. or maybe I didn't understand. What I want to do is to transform the regional characters of a String like "�" into "ü" The reason is, that I don't want to use utf-8, but ISO-8859-1 for my html pages. And if a "�" appears in the ISO-8859-1 characterset in the browser, it is not displayed correctly in a browser using the english locale. But it is displayed correctly if "ü" is used. (what is the name for this format?) As far as I could learn, java.net.URLEncoder transforms into "application/x-www-form-urlencoded MIME format", used for the URLs. But this format is not for the body of a html page, right? Regards, Bernhard -----Urspr�ngliche Nachricht----- Von: Craig R. McClanahan Gesendet: Dienstag, 14. Januar 2003 19:06 An: Struts Users Mailing List Betreff: Re: AW: Transforming a String to valid HTML encoding On Tue, 14 Jan 2003, Hirschmann, Bernhard wrote: > Date: Tue, 14 Jan 2003 17:31:03 +0100 > From: "Hirschmann, Bernhard" > Reply-To: Struts Users Mailing List > To: 'Struts Users Mailing List' > Subject: AW: Transforming a String to valid HTML encoding > > > I wonder if this problem is too easy or too hard - may please somebody > comment this? > ResponseUtils is only worried about filtering the characters that could cause security problems -- it is not designed to be a general purpose URL encoder. For that, check out the java.net.URLEncoder class. > Craig? > > Thank you very much Craig > > > ----- original message ----- > > I still have the problem to transform a String containing national special > characters to the appropriate HTML encoding. > > i.e.: "sch�n & reich" --> "schön & reich" > > The class org.apache.struts.util.ResponseUtils only transforms the 4 > characters <, >, & and " into their html representative. > > Is there another transformer around? > > Any hints highly appreciated. > > Regards, > Bernhard > > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: