Back to Blog
Dotkernel

Using UTF8 charset in DotKernel

In order to use UTF8 encoding in your DotKernel based system, is needed to make some changes in both database structure and in the application.ini file.
Those changes are commited into DotKernel 1.6.0 dev codebase, which will be released in next days.

Database

set for all tables and columns proper collation , either utf8_general_ci or utf8_bin

Application.ini

add the line
>database.params.charset = utf8
to your application.ini file, in the area.

Differences between utf8_general_ci and utf8_bin

utf8_bin: compare strings by the binary value of each character in the string utf8_general_ci: compare strings using general language rules and using case-insensitive comparisons For example, the following will evaluate at true with  utf8_general_ci collation, but not with the utf8_bin collation: Ä = A Ö = O Ü = U Those differences happens only on MySQL level ( for instance in queries using LIKE operator) and not at PHP level ( for instance, in str_replace() calls )