Below you have the configuration for UTF-8. Note that this is valid for XWiki 1.0 b5 and above. Easier configuration might be provided for upcoming releases.

XWiki encoding

Change the charset encoding in these XWiki files:

web.xml: locate the filter class org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter and change it to UTF-8. It should look like this:

<filter><filter-name>Set Character Encoding</filter-name><filter-class>org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>UTF-8</param-value></init-param></filter>

xwiki.cfg : locate the line containing xwiki.encoding and change it to look like this:

To run XWiki with UTF-8 in Glassfish you will need to recreate the XWiki WAR file and do a change to the glassfish config. First, in the Administration GUI under Domain => General => Locale enter en_US.UTF-8.

Now you will need to add all the aforementioned changes from this document to the files in the war file, create a new warfile, and deploy that one to your glassfish installation. This is required due to the fact that Glassfish will not accept changes to a deployed web.xml file. So you need to deploy a ready changed web.xml file inside your war file because all subsequent changes to the deployed web.xml file in the filesystem are totally ignored.

Create a new directory that we will use as a temporary place to edit our war file:

mkdir xwikitmp

Unpack the warfile (replace <suffix> with the proper name for the version of XWiki you're using):

cd xwikitemp;jar xvf ../xwiki-<suffix>.war

Edit the files as mentioned in the beginning of this article:

wiki.cfg

web.xml

hibernate.cfg.xml

Now let's create a new warfile which contains all the changes:

jar cvf ../xwiki-<suffix>.war .

Now you can deploy your new .war file to Glassfish and it will have all the changes in it and wll be correctly deployed.

Web server

Apache

Make sure that the Apache configuration file httpd.conf contains the following line: