[GH-ISSUE #99] Support for variable charset and collation #208

Open
opened 2026-03-07 20:42:07 +03:00 by kerem · 1 comment
Owner

Originally created by @pasmat on GitHub (Jun 19, 2020).
Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/99

I am using charset utf8mb4 and collation utf8mb4_swedish_ci on both target and source databases.

When I am using some characters that require multibyte encoding, such as emoji's 👋, the tool will treat emoji's as question marks of some sort.

The charset and collation is hardcoded in DBManager.php

'charset' => 'utf8', 'collation' => 'utf8_unicode_ci'

I am not sure if there's a general charset that could be used that would account for all cases, such as the uf8mb4, or should it be better to let user define them, or detect them from source and target databases.

I changed the charset and collation by hand, and it fixed it for me.

Originally created by @pasmat on GitHub (Jun 19, 2020). Original GitHub issue: https://github.com/DBDiff/DBDiff/issues/99 I am using charset utf8mb4 and collation utf8mb4_swedish_ci on both target and source databases. When I am using some characters that require multibyte encoding, such as emoji's 👋, the tool will treat emoji's as question marks of some sort. The charset and collation is hardcoded in DBManager.php ` 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci'` I am not sure if there's a general charset that could be used that would account for all cases, such as the uf8mb4, or should it be better to let user define them, or detect them from source and target databases. I changed the charset and collation by hand, and it fixed it for me.
Author
Owner

@SanaAnsari09 commented on GitHub (Jul 13, 2021):

Did you build the dbdiff folder again after making changes

<!-- gh-comment-id:879050171 --> @SanaAnsari09 commented on GitHub (Jul 13, 2021): Did you build the dbdiff folder again after making changes
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#208
No description provided.