Skip to content

MySQL UTF8 encoding issues with table-specific encodings/collations #93

@javier-sanz

Description

@javier-sanz

So syncing to tables between 2 MySQL databases I found the next error

Error in the 'to' worker: Incorrect string value: '\xF0\x9F\x91\x8D' for column 'msg' at row 2647

The column is created like this by KS

CREATE TABLE `orders` (
...
  `msg` mediumtext,
...
)

But comparing DLL I have this on the original table

CREATE TABLE `orders` (
...
`msg` mediumtext COLLATE utf8mb4_unicode_ci,
...
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

but on the copy

CREATE TABLE `orders` (
...
`msg` mediumtext mediumtext COLLATE utf8_unicode_ci,
...
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

I guess that triggers this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions