Beginning with version 5.5 of MySQL , utf8mb4 character set was introduced, in order to better support Unicode.
Further reading: MySQL and Unicode , also directly related to PHP

Sample dk.sql file, part of DotKernel framework, was updated in revision 793

Only one downside , is not possible to use anymore VARCHAR(255), as you will get the error:

#1071 - Specified key was too long; max key length is 767 bytes

Explanation here ; so we use instead VARCHAR(150)

Now we should change the connection charset. In config/application.ini file, edit the below line :

database.params.charset = utf8mb4

Other changes that can be made in my.cnf file are all related to replacing the string utf8_* with utf8mb4_*

character_set_server=utf8mb4
collation_server=utf8mb4_general_ci
collation_server=utf8mb4_unicode_ci

Looking for PHP, Laminas or Mezzio Support?

As part of the Laminas Commercial Vendor Program, Apidemia offers expert technical support and services for:

  • Modernising Legacy Applications
  • Migration from any version of Zend Framework to Laminas
  • Migration from legacy Laminas API Tools (formerly Apigility) to Dotkernel API
  • Mezzio and Laminas Consulting and Technical Audit
  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>