Encoding Fix Verification

Because changes to your Tiki database encoding can be confusing and difficult to troubleshoot problems it's best to do a few quick verification, after you have applied the three steps of the upgrade process to "fix the encoding issue" (if needed, see https://doc.tiki.org/Upgrade#Fix_the_encoding_issue) .

1.1. Verify local.php

This file stores the Tiki database connection information

  1. Open <Tiki Install Location>/db/local.php with your favorite text editor (vi, emacs, etc...)
  2. Verify client_charset is set to utf8
  3. update manually if incorrect


1.2. Verify Database

The database and its tables should have been updated to use the utf8 character set. Verifying the database involves querying the "information_schema" which is essentially the data dictionary for MySQL. So log in to MySQL using the Tiki schema (database) owner account to execute these queries.

1.2.1. Schema verification

This simple select lists characteristics for the database itself.

Schema Verification SQL
Copy to clipboard
select * from information_schema.schemata;
  1. Run the SQL
  2. Verify the "DEFAULT_CHARACTER_SET_NAME" for the Tiki schema is set to "utf8" and that "DEFAULT_COLLATION_NAME" is set to "utf8_general_ci"
  3. If these values are not as specified, run the below SQL:
Schema Correction SQL
Copy to clipboard
ALTER DATABASE {Tiki db_name} DEFAULT CHARACTER SET 'utf8' DEFAULT COLLATE 'utf8_general_ci';


1.2.2. Table verification

This simple select lists key characteristics for each table of the Tiki DB.

Table Verification SQL
Copy to clipboard
select table_name, table_collation from information_schema.tables where table_schema = '{Tiki db_name}';
  1. Run the SQL
  2. Verify "table_collation" is set to "utf_general_ci"
  3. Run the below SQL for each table not set correctly
Table Correction SQL
Copy to clipboard
ALTER TABLE {Tiki db_name}.{Table Name} CONVERT TO CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' DEFAULT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';

1.2.3. Content verification

You need to be sure that the content in your database has been converted to utf-8. If you had non as-cii characters in your wiki pages, it's very easy to verify if you had your db tables content converted to utf-8 or not.

If you see weird characters instead of non-ascii characters like accents, tilde, apostrophes, etc, then your content is not in utf-8. In this case, you can apply the fix from the installer in the last step.

Check https://doc.tiki.org/Upgrade#Fix_the_encoding_issue .

If you were using plain English in your wiki pages, then ask for help in the Irc channel, for instance.