You should set the character encoding of your JDBC driver and database with the encoding that is suitable for the locales that your site is supporting. The encoding of the database server must be the same as the encoding of the site content, including JSP files and repository content. This encoding should match the EncodingTyper
encoding. For example, if you are setting up a database for one or more Western-European languages, the encoding of the database server should be ISO8859_1. If you are setting up a Japanese-locale site that serves content in SJIS, the encoding of the database server should be SJIS. If you are setting up a web site to support multiple locales, including Western-European languages and non-Latin character languages, the encoding of the database server should be Unicode. You should also make sure that the database you use has the appropriate character set installed and selected in order to support multi-byte character sets.
The following are three example configurations:
If the web content is in one or more Western European languages, set the encoding of the database server to
ISO8859_1
.If the web site is serving Japanese content that is in
SJIS
, set the encoding of the database server toSJIS
.If the web site is serving Japanese content and Western-European content, set the encoding of the database server to Unicode.
Evaluate the needs of your web site and choose the appropriate encoding.