*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation

Paul Albert, Eliza Chan, Prakash Adekkanattu

Weill Cornell Medical College

See Also Tomcat server.xml configuration to support non-Roman characters (UTF-8)

Handling foreign characters

The following steps ensure a proper display of foreign characters on the VIVO web interface.

1.

Modify the configuration file my.cnf to use the UTF8 character set:

[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'

2. When creating a new VIVO database, configure it to use the UTF8 character set:

create database <database_name> character set UTF8

3. Test if the newly created database or an existing database uses UTF8 character set

A properly configured database should show the following results:

a) SHOW VARIABLES LIKE 'character_set%';

 +--------------------------+-----------------------------------------------

| Variable_name | Value
+--------------------------+-----------------------------------------------
| character_set_client | utf8
| character_set_connection | utf8
| character_set_database | utf8
| character_set_filesystem | binary
| character_set_results | utf8
| character_set_server | utf8
| character_set_system | utf8
| character_sets_dir | /usr/local/mysql-5.1.50-osx10.6-x86_64/share/charsets/ |

 

b) SHOW VARIABLES LIKE 'collation%';
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+

4. To ensure individual tables use the UTF8 character set, run the following:

 
ALTER TABLE Nodes CONVERT TO CHARACTER SET utf8 collate utf8_general_ci;

  • No labels