IMHO the encoding in webwork should be specified globally using the webwork.i18n.encoding property, rather than in velocity.properties.
Can you add a JIRA issue for this?
http://jira.opensymphony.com/
Cheers, Scott
Fernando Martins wrote:
In line 74 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
--
ATLASSIAN - http://www.atlassian.com Expert J2EE Software, Services and Support ------------------------------------------------------- Need a simple, powerful way to track and manage issues? Try JIRA - http://www.atlassian.com/software/jira
------------------------------------------------------- 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