Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
spaceKeyGrouper
pageTitleNavigation

This document relates to page presents information on Grouper and internationalization, handling non-English characters, UTF-8, accents, etc.

...

Grouper works with non-English characters, but the environment must be setup correctly for this to happen.  Your database must support it, your Java settings must be set correctly, you tomcat your Tomcat settings must be set correctly.  In Grouper 2.2.1 patch grouper_v2_2_1_api_patch_9 there are checks at startup. Grouper patches are listed on the Release Notes page.

There are checks at startup to make sure the non-Tomcat settings are correct.

...

Code Block
# when reading writing files from util classes, this is encoding (was ISO-8859-1)
grouper.default.fileEncoding = UTF-8

 


These settings will detect if you your database and file system can handle UTF-8, and if transactions, and case sensitivity are handled correctly. You can get a success message if you are debugging, but this defaults to off. These will run in another thread so they dont don't affect start time (optionally default to true)

Code Block
# if should check database and utf in new thread
configuration.checkDatabaseAndUtf.inNewThread = true
# if grouper should check to see if the database has case sensitive selects
configuration.detect.db.caseSensitive.problems = true
configuration.display.db.caseSensitive.success.message = false
# if grouper should check to see if utf-8 works on startup in files
configuration.detect.utf8.file.problems = true
# if grouper should check to see if utf-8 works on startup in the database
configuration.detect.utf8.problems = true
configuration.display.utf8.success.message = false
# if grouper in the utf8 check will check to see if grouper supports transaction
configuration.detect.db.transaction.problems = true
configuration.display.transaction.success.message = false

...


If there is a problem with start, you will see a message like this, but it will not cause grouper not to start:

...

Note, it will try to give suggestions about what the problem could be.

Grouper and UTF-8

Info

utf8mb4 is not recommended because the database engines in MySQL/MariaDB that support transactions have limitations on the length of prefixes for indices. For InnoDB and XtraDB, the prefix is limited to 767 bytes. When using utf8mb4, where 4 bytes are used instead of 2, the prefixes used for some Grouper tables are too long.


For Grouper to handle UTF-8 characters:

  • Make sure java starts with this setting: -Dfile.encoding=UTF-8   for example, in tomcat, put something like this in your startup script:

    Code Block
    export JAVA_OPTS="-server -Xms50M -Xmx200M -XX:MaxPermSize=95M -Dfile.encoding=UTF-8"


  • Make sure URIEncoding is set to UTF-8 in the server.xml in tomcat in the Connector element, here is an example

    Code Block
    <Connector port="8111" protocol="AJP/1.3" request.tomcatAuthentication="false"
            URIEncoding="UTF-8" />


  • Make sure your database tables are using UTF-8.  If  For Mysql you might want to use utf8mb4. If not, e.g. for mysqlMySQL, you might need to SQL dump, delete the DB, create with default UTF-8 bin collation, and import the SQL.
  • Make sure your connect string to the database is configured to use UTF-8 (if applicable).  For mysqlMySQL, here is an example (see the stuff after the question mark).  Note, in windows mysql Windows MySQL this isn't necessary

    Code Block
    hibernate.connection.url = jdbc:mysql://localhost:3306/grouper_v2_2?CharSet=utf8&useUnicode=true&characterEncoding=utf8
    
    

...



Grouper v2.2+ translations

If you want to add a localization to the Grouper UI text (example for frenchFrench):

Add this to your grouper-ui.properties (index must increment from the base file:

...

Insert some subjects in the DB/LDAP (if you dont don't already have some in an existing source, note, you need the default source enabled if you use this sql):

...

Lite combo and submitting

...

 

See Also

Grouper Configuration Overlays

API Building and Configuration


...