Jump to content

UTF8 to UTF8MB4 issue


Recommended Posts

Posted

Hi

My community runs on Mariadb 10.1, PHP 7.

I recently converted all tables to InnoDB, and confirmed all tables and columns are utf8mb4 after running the "enable utf8mb4" option in admin.

After running the utf8mb4 I still see the enable utf8mb4 option in admin.

If I go to support and click on something isn't working right I get this warning:

" Your database is currently configured to use single-byte UTF-8 Encoding. Some non-common symbols (such as historical scripts, music symbols and Emoji) require 4-Byte UTF-8 Encoding. If you want users to be able to post these symbols, your database needs to be converted."

I changed the server character set and collation from mysql command line, and I changed my.cnf to set the clint, mysql and mysqld run time options. I restarted the server, then ran mysqlcheck to repair and optimize all tables.I restarted mysql.

Yet I still get the same warning in admin.

" Your database is currently configured to use single-byte UTF-8 Encoding. Some non-common symbols (such as historical scripts, music symbols and Emoji) require 4-Byte UTF-8 Encoding. If you want users to be able to post these symbols, your database needs to be converted."

In mysql if I look for server and database options I see this:

+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

+----------------------+--------------------+
| Variable_name        | Value              |
+----------------------+--------------------+
| collation_connection | utf8mb4_general_ci |
| collation_database   | utf8mb4_unicode_ci |
| collation_server     | utf8mb4_unicode_ci |
+----------------------+--------------------+

and the relevant variables in conf_global.php

$INFO['mysql_tbl_type']                 =       'InnoDB';
$INFO['sql_charset']                    =       'utf8mb4';
$INFO['use_utf8mb4']                    =       'true';
$INFO['sql_utf8mb4']                    =       'true';

 

Any ideas what is wrong and how I should fix it?

 

On a side issue, this clone of my site is on the test url, and everytime I go to support and clcik that something is wrong it regenerates the cache... only trouble is it is regenerating the cache based upon the real forum url, NOT the test forum url. The correct url is entered in conf_global.php.

So I am running an update on the datastore using:

 find . -type f -exec sed -i 's/forum.oldurl/forums2.newurl/g' {} +

Where else is the forum url embedded that requires manual changing after a change in site url?

Could this be related to the charset issue? Could the utf8mb4 check be looking at the main site db? if so that is concerning!

Cheers

John

Posted
On 12/04/2017 at 7:21 AM, opentype said:

Open a ticket if you want a staff answer. You are in the peer-2-peer forum. 

Well I had wanted anyone to answer on the overall question.  I added my question about the script because no one else answered and staff do occasionally answer on these boards. Not exactly unreasonable to ask on the offchance before I go and raise a ticket.

I thought maybe others would have had a similar experience. I guess not.

Posted

I answered a ticket earlier with this issue (which may have been yours?)

Note that the $INFO line with 'true' needs to have the single quotes removed, as it is a Boolean value, so it would be:

$INFO['sql_utf8mb4']                    =       true;

If that does not resolve the issue, however, please file a ticket to support and we'll be glad to assist.

Posted
1 hour ago, Mark H said:

Note that the $INFO line with 'true' needs to have the single quotes removed, as it is a Boolean value, so it would be:

$INFO['sql_utf8mb4']                    =       true;

solved my problem - thx!

Posted

Yeah thanks Mark. A rookie mistake on my part. Thanks for your help.

opentype, no worries. Just didn't want to be treading on toes or playing by my own rules :)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...