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" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> 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&ouml;n &amp 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:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to