Versions Compared

Key

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

...

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 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 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.  For Mysql you might want to use utf8mb4. If not, e.g. for MySQL, 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 MySQL, here is an example (see the stuff after the question mark).  Note, in 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 French):

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

...

API Building and Configuration

 

 


...