SiteMesh and Charsets
Platform DefaultsThe default character set for SiteMesh is iso-8859-1. SiteMesh currentlyassumes that the underlying platform encoding is also iso-8859-1.
This can cause some fairly insidious problems if there is a mismatch betweenthe two! Specifically, on platforms which have a different file encoding, thisshould be overridden. The two known platforms which do not have iso-8859-1encoding by default are IBM AS/400 JDK's and OSX. The work around in these casesis to specify a -Dfile.encoding=iso-8859-1 parameter as JVMargument when starting the application server.
Using Other Encodings
The iso-8859-1 encoding is sufficient for most European and Western charactersets, so nothing will need to be done in this case. However, for other languagesthat require the full range of the UTF-8 character set, this has to beexplicitly specified at a number of places, some SiteMesh specific, some appserver specific/jsp specific.
Note that the examples below all refer to UTF-8. The same approach applies toany encoding other than iso-8859-1, and is not limited to UTF-8.
1. If possible, the web application should be configured to use UTF-8as the default encoding. Orion allows this to be specific in orion-web.xml, asthe default-charset attribute. Weblogic requires a contextparameter named weblogic.httpd.inputCharset. See your applicationserver documentation for more details. If the application server of choice doesnot allow to set the default charset for all web-apps, then every page(including the decorators) will need to specify the content-type. This is doneby specifying a page header tag like this:
<div class="dp-highlighter"><div class="bar">
页:
[1]