You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-user@jakarta.apache.org by "Hinrich.Boog" <hi...@infopark.com> on 2001/04/09 15:03:10 UTC
Umlaute and other special characters.
Hi there,
I have a question concerning the ECS-html library: When I construct an <select><option
value="test"></select> tag with the constructor
new Option("test");
and the String I pass contains special characters (e.g. like german 'umlaute'), the returned HTML
code is not correct, instead the option-tag just ends where the special character should occur.
Has anybody experience with that or a workaround ?
Thanks.
Hinrich
---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org
Re: Umlaute and other special characters.
Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Stephan Nagy wrote:
> "Hinrich.Boog" wrote:
>
> > Hi there,
> >
> > I have a question concerning the ECS-html library: When I construct an <select><option
> > value="test"></select> tag with the constructor
> >
> > new Option("test");
> >
> > and the String I pass contains special characters (e.g. like german 'umlaute'), the returned HTML
> > code is not correct, instead the option-tag just ends where the special character should occur.
> > Has anybody experience with that or a workaround ?
> >
>
i'm pretty sure that this is the same problem magnus (see the "International characters in 1.4.1"
thread) was having.
he's got back to me now and says that this (emergency) patch (which i've attached) has fixed the
problem for him.
> Sadly, I only speak one language so I am ill equiped to answer questions of this type, but if you
> send me a code example I'll take a look at it.
if Hinrich.Boog can supply a code example, then great - but if you're really stuck stephen, i have one
from magnus (i'll forward to the list).
i'm not totally happy with the patch since it's a 'intuitive workaround' rather than reasoned
workaround. i'd be happier to know why ByteArrayOutputStream mangles international characters but
StringWriter doesn't. i have a gut feeling that the workaround in the patch might have some ugly
side-effects or that there will be other problems to do with international characters.
stephen - if you could take a look and see what you think, i'd feel a lot happier.
- robert
Re: Umlaute and other special characters.
Posted by "Hinrich.Boog" <hi...@infopark.com>.
> Sadly, I only speak one language so I am ill equiped to answer questions of this type, but if you
> send me a code example I'll take a look at it.
>
> -stephan
Try this:
public String getOption() {
String value = "m�nnlich";//means 'male', so typical for the gender
//choice.
Option option = new Option(value);
option.setLabel("Something");
return option.toString();
}
Greetings
Hinrich
Hinrich Boog, hinrich.boog@infopark.de
Infopark AG
Kitzingstr. 15, D-12277 Berlin, Germany
Tel +49(0)-30-747.993.0, Fax +49(0)-30-747.993.93
http://www.infopark.de/
---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org
Re: Umlaute and other special characters.
Posted by Stephan Nagy <sn...@connectria.com>.
"Hinrich.Boog" wrote:
> Hi there,
>
> I have a question concerning the ECS-html library: When I construct an <select><option
> value="test"></select> tag with the constructor
>
> new Option("test");
>
> and the String I pass contains special characters (e.g. like german 'umlaute'), the returned HTML
> code is not correct, instead the option-tag just ends where the special character should occur.
> Has anybody experience with that or a workaround ?
>
Sadly, I only speak one language so I am ill equiped to answer questions of this type, but if you
send me a code example I'll take a look at it.
-stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-user-help@jakarta.apache.org