[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-2729) Document and implement changes for MySQL and UTF8 storage

Christian Bauer (JIRA) jira-events at lists.jboss.org
Thu Apr 3 07:18:52 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2729?page=all ]

Christian Bauer closed JBSEAM-2729.
-----------------------------------

    Fix Version/s: 2.1.0.GA
       Resolution: Done

The wiki can now be installed on a UTF-8 enabled MySQL database, this is the README excerpt:

INSTALLATION WITH UNICODE SUPPORT ON MYSQL
==========================================================================================

If you want to use any non-latin characters, create the MySQL database you want to use (or
drop and recreate the default 'test' database) with the following options:

      CREATE DATABASE test CHARACTER SET utf8 COLLATE utf8_general_ci;

Your database should at least have the 'character_set_database' variable set to 'utf8':

  mysql> show variables like '%character%';
  +--------------------------+------------------------------------------------------------+
  | Variable_name            | Value                                                      |
  +--------------------------+------------------------------------------------------------+
  | character_set_client     | latin1                                                     |
  | character_set_connection | latin1                                                     |
  | character_set_database   | utf8                                                       |
  | character_set_filesystem | binary                                                     |
  | character_set_results    | latin1                                                     |
  | character_set_server     | latin1                                                     |
  | character_set_system     | utf8                                                       |
  | character_sets_dir       | /usr/local/mysql-5.0.45-osx10.4-i686/share/mysql/charsets/ |
  +--------------------------+------------------------------------------------------------+

If you keep the default latin1 encoding, exceptions will be thrown by the application as
soon as you try to store any non-latin character.

Note that due to URL rewriting rules, stored wiki items (documents, uploaded files) MUST have
at least 3 latin-1 characters in their name! The application will prompt you with a validation
error message when you forget that limitation and enter only non-latin-1 characters in a form.

The wiki search engine passes search terms as request parameters in the URI. If you require
unicode support for search terms, you need to set an option in Tomcat to enable the correct
decoding of URL-encoded request parameter values to UTF-8. To do that, edit
  ${JBOSS_HOME}/server/(default)/deploy/jboss-web.deployer/server.xml
and add
  URIEncoding="UTF-8"
to the <connector> declaration.



> Document and implement changes for MySQL and UTF8 storage
> ---------------------------------------------------------
>
>                 Key: JBSEAM-2729
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2729
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Wiki
>            Reporter: Christian Bauer
>         Assigned To: Christian Bauer
>            Priority: Blocker
>             Fix For: 2.1.0.GA
>
>
> This involves:
> - correct magical JDBC URL parameters for MySQL5
> - providing a custom Hibernate dialect that does not assume that VARCHAR can take the whole "maximum row size" in MySQL of 65535 bytes
> - magical incantations when creating a database on MySQL put down in README.txt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list