Firstly:
<bean:write filter="true"> doesn't transform ü into &uuml;
it only transforms <, >, & and " into its HTML encoding.
You can see that in the source code of 
org.apache.struts.util.ResponseUtils

Secondly:
If you're using charset=ISO-8859-1 your German special characters are only
displayed correctly, if your're using a German locale, as far as I remember.
Try to use a user with a different locale (english) on the same machine and
the display will be messed up.

> But when I have text field originally coming from my MySQL database on
> that Solaris machine that I want to display with <bean:write> I
> encounter problems and receive only "?" in my html source.

Yes, if this text is encoded in ISO-8859-1 and your JSPs are told to use
UTF-8 or vice versa. So you should use only one character encoding for your
browser.


> Only <bean:write filter="false" in combination with data fields
> containing "abcd&uuml;efg&auml;test" works fine.

Yes, because this text is fully "ASCII compatible". (there are no special
characters)


> With <bean:write filter="true"> the & get's converted to &amp;

Yes, because [see "firstly"]


> I have no idea if this is more a mysql problem than a Tomcat/Struts
> issue since my above tests work fine as long as the data is not from db?
> Maybe it gets garbled in my database DAO classes already while querying
> the db... no idea...

As I said: Make sure your text from the DB is encoded in UTF-8, then it will
be displayed correctly in a JSP which uses UTF-8.


>> I would always use a resource bundle for your texts, no 
>> matter if you use only German. The special characters in the 
>> resource bundle could use HTML encoding, so you don't have to 
>> care about saving the properties files in utf-8. (We do it this way)
> I would do it, if i could rely on someone editing those resource bundles
> later and using taglibs. But unfortunately I have to use plain html
> saved as .jsp whereever possible for latter maintenance of html-only
> folks.

I think we're talking about two different things, are we?
When I say "resource bundle" then I mean the use of the
ApplicationResources.properties file. You can't use any taglib in it. But
you can write "sch&ouml;n" instead of "schön". That's what I have meant.


Is it more clear now? :-)

Regards,
Bernhard

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

Reply via email to