Jesus! So much work for that purpose? :-)

Have you tried to use UTF-8 for your JSPs? Then all that transforming to
HTML encoding is not necessary anymore. It works great at my project, and I
have to use more special characters than in German. (27 languages in fact)

See http://www.anassina.com/struts/i18n/i18n.html for a full how-to.

Regards,
Bernhard


-----Ursprüngliche Nachricht-----
Von: mech [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 4. Februar 2003 11:42
An: 'Struts Users Mailing List'
Betreff: RE: HTML entities (general Struts taglib problem with language
entities)


You can usually use the attribute (e.g. with <bean:write>):
filter="true" if you want special characters converted into html
substitutions or filter="false" if you like to format your view with
<br> tags.

Unfortunatally, i hate converting all my German language Umlaute into
&auml; &uuml; etc. in my database. 

If I say filter="true" my German special letters won't get filtered and
I get stupid output if my Solaris server runs on English language
instead like my development server in German language.

If I say filter="true" an use &auml; etc. coming from my db fields, I
get & filtered to &amp; which doesn't help much either...
In the html output I would get &amp;uuml; instead of &uuml; 

So I have to always filter="false" and use &auml; etc. for all German
characters in my db. :-( At least than I can also use html tags for
formating stored in the db.

So on question for the future development.
Could the tag filter be enhanced to filter not only brackets etc. but
also language characters? 

Otherwise you'll have a problems if you use filter="true" and
filter="false" aswell. Either you have to convert all your database
field's not to use any language specific characters. 
Or you can't use filter="true" because your language specific html
entities get converted twice because one character in the escape
sequence (the & character) gets filtered again...

What would be needed would be an filter="true" logic that doesn't filter
the & of escape sequences or to filter also language specific html
entities. The last thing would be the cleaner way.

Michael


> -----Original Message-----
> From: Mark Lowe [mailto:[EMAIL PROTECTED]] 
> Sent: Dienstag, 4. Februar 2003 11:16
> To: Struts List
> Subject: HTML entities
> 
> 
> Has anyone any information on preventing "<" and ">" being translated 
> into &lt; and &gt; when using the tag libs..
> 
> I have a bunch of data in my sql... there are a few presentation tags 
> strored in the db (e.g. <br>, <b> etc)..
> 
> I've parsed the results to replace any entities to "<" etc 
> but they're 
> being coverted in the jsp when iterating through the result...
> 
> My results set contains
> 
> <br> etc
> 
> i read this into map which i then put into an array (array of maps)
> 
> put the array in the request...
> 
> It seems to me that
> 
> the encoding is happening
> 1. during the iteration
> 2. when being set in the request
> 3. when being added to the map
> 
> I'm working my way through these possibilties now but if anyone knows 
> anything then please don't be shy..
> 
> Any suggestions?
> 
> Thanks mark
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

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

Reply via email to