Ugh ... this completely slipped by me. It's fixed now in CVS.

M

Fernando Martins wrote:

Now that there is a velocity.properties configuration loading mechanism, could someone please add the below changes to CVS so that I don't have to change it everytime I update.

And then, mark
http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-200
as resolved.

Thanks

Fernando Martins wrote:


In line 76 of VelocityResult there is:


response.setContentType("text/html");

this doesn't account for different charsets that should be in content-type
if encoding being used is other than ISO-8859-1.


in org.apache.velocity.Template there is method getEncoding() which I
think should be used here to set the charset of content-type i.e.:

response.setContentType("text/html; charset="+t.getEncoding());

This way, it will set content-type with the encoding velocity is
configured with (in velocity.properties encoding can be specified. How
to get velocity to read those properties is another story. In my case I
tried velocity-1.4-dev from CVS and it reads the properties file).

You can argue that if I want diferent encoding in my pages I should use
html:

<meta http-equiv="Content-type" content="text/html;charset=iso-8859-2">

That works in normal cases, but if I need to compress the pages with Gzip
(Content-Encoding: gzip) browsers will just not pay attention to meta and
will set the encoding to what is in Content-Type. That's why I need it to
have the correct encoding in Content-Type.

Am I missing something obvious here?

Thanks
Fernando



-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork







------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to