Wide character in print at /usr/bin/pt-archiver line 6700.

Hi Carlos,

That helped, the tool is running now without stopping due to reported error. I’ll report back in case it reoccurs.

Thanks for your help, much appreciate it!

1 Like

Hi,

Please let me know if it works and if it doesn’t work. I want to officially add the fix.

Thanks for your help.

1 Like

Hi,

That works.

Once I added two lines that you asked to add the tool is running since then without any issue, It’s currently archiving DB that have reported characters.

Great, thanks.

1 Like

Hello,

Just a follow up. I’ve created [url][PT-1611] pt-archiver fails with UTF-8 chars - Percona JIRA
It will be released in next PT (3.0.12)

Regards

1 Like

I got the same now with pt-archiver 3.5.0, after replacing the source database from a percona database to a mariadb database. The default character set was also changed. Perhaps it’s related to the mysql-specific charset utf8mb4.

I managed to work around the problem with this hack:

--- /tmp/pt-archiver-orig	2023-01-04 14:02:54.597644218 +0100
+++ /tmp/pt-archiver	2023-01-04 14:02:42.031017165 +0100
@@ -6642,7 +6642,7 @@
       return 0;
    }

-   my $charset  = $got_charset || '';
+   my $charset  = 'utf8';
    if ($charset eq 'utf8') {
       $charset = ":$charset";
    }
1 Like

A more proper fix would probably be to add a --charset-option

1 Like