Encoding tests: Static content

This page tests that static content (i.e. text typed directly into a source) is correctly handling and displayed in all situations.

Set up

No set up necessary. Just check below.

Notes

In order to include non LATIN-1 characters directly in source files you must state the page encoding you are using. See Howto force pageEncoding on Tomcat for more details.

Depending on how this test site has been set up it is either not setting the value or is doing it globally via web.xml (jsp-config element). If it is doing it centrally then all test below should pass. If not the last one will probably fail.

Important note: if you alter your web.xml settings then make sure you also clear the work directory before re-running this test. The page must be recompiled for character encoding changes to take effect.

The source JSP for this test is encoded as UTF-8.

Results

Test Expected Actual Result
Static text displayed directly “some £ € évents…” “some £ € évents…” -manual-
Static text via Emailer tag “some £ € évents…” Check manually! -manual-
Static text via include (setting pageEncoding) “some £ € évents…” “some £ € évents…” PASS
Static text via include (not setting pageEncoding) “some £ € évents…” “some £ € évents…” PASS