# pt-table-sync error (character encoding)

**URL:** https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793
**Category:** Other MySQL® Questions
**Tags:** mysql
**Created:** [July 20, 2020, 7:30pm UTC](https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793 "2020-07-20T19:30:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mbcheikh](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mbcheikh](https://forums.percona.com/u/mbcheikh)
#### Post date: [July 20, 2020, 7:30pm UTC](https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793/1 "2020-07-20T19:30:51Z")

</div>

Hi,How can I fix this error ? Which env variables or locales, or mysql variables of the hosts I have to check ? Hosts are ubuntu servers.Note that the column “désignation” (in french)&nbsp; is written correctly in the printed sql, but&nbsp; I am completely ignorant in perl to interpret it.&nbsp; Thank you.  
# pt-table-sync --execute --verbose --databases biogal --charset=utf8 -t ligbl&nbsp; h=10.8.0.11,u=root,p=xxxxxxxx h=127.0.0.1,u=root,p=xxxxxxxx  
# Syncing A=utf8,h=127.0.0.1,p=…,u=root  
# DELETE REPLACE INSERT UPDATE ALGORITHM START&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXIT DATABASE.TABLE  
Unknown column ‘dÃ©signation’ in ‘field list’ [for Statement “INSERT INTO `biogal`.`ligbl`(`dp`, `a d`, `prod`, `quant`, `prix u`, `t`, `r`, `client`, `date`, `l`, `x`, `mois`, `nb cartons`, `n0 lot`, `date peremption`, `conditionnement`, `cond`, `pmp`, `prix_devise`, `tarif`, `devise`, `cours`, `nouvnumcom`, `rcno`, `désignation`, `n°commande`, `n°facture`, `année`, `n°bl`) VALUES (‘M06’, ‘’, ‘T.D’, 1, 70000, 19, 0, 20557, ‘2020-07-20 00:00:00’, 2, NULL, NULL, 0, ‘’, ‘1980-01-01 00:00:00’, 1, ‘’, 0, NULL, NULL, NULL, NULL, ‘0’, ‘243127’, ‘Temps de d�placement’, ‘158005’, NULL, NULL, ‘2002376’) /_percona-toolkit src\_db:biogal src\_tbl:ligbl src\_dsn:A=utf8,h=10.8.0.11,p=…,u=root dst\_db:biogal dst\_tbl:ligbl dst\_dsn:A=utf8,h=127.0.0.1,p=…,u=root lock:0 transaction:1 changing\_src:0 replicate:0 bidirectional:0 pid:14791 user:root host:biom_/”] at line 10946 while doing biogal.ligbl on 127.0.0.1  
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 01:34:46 01:35:22 1&nbsp;&nbsp;&nbsp; biogal.ligbl  
# pt-table-sync --version  
pt-table-sync 3.2.0

---

<div class="post-metadata">

### Author: ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)
#### Post date: [July 23, 2020, 4:33pm UTC](https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793/2 "2020-07-23T16:33:49Z")

</div>

```auto
# Syncing A=utf8,h=127.0.0.1,p=...,u=root

```

Try specifying A=utf8m4 or --charset=utf8mb4 in your command and let us know if that resolves it.[pt-table-sync — Percona Toolkit Documentation](https://www.percona.com/doc/percona-toolkit/LATEST/pt-table-sync.html#dsn-options)

---

<div class="post-metadata">

### Author: ![mbcheikh](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mbcheikh](https://forums.percona.com/u/mbcheikh)
#### Post date: [July 23, 2020, 5:09pm UTC](https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793/3 "2020-07-23T17:09:16Z")

</div>

Thank you&nbsp; for the answer. Unfortunatly it gives the same result :(. But I have to specify that the source server is mysql 5.7 while the target server is 8.0. does this matter ?   
root@biom:/home/scripts# pt-table-sync --execute --verbose --databases biogal&nbsp;&nbsp; --charset=utf8mb4 -t ligbl&nbsp; h=10.8.0.11,A=utf8mb4,u=root,p=xxxxxxxx h=127.0.0.1,A=utf8mb4,u=root,p=xxxxxxxx  
# Syncing A=utf8mb4,h=127.0.0.1,p=…,u=root  
# DELETE REPLACE INSERT UPDATE ALGORITHM START&nbsp;&nbsp;&nbsp; END&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXIT DATABASE.TABLE  
Unknown column ‘nÂ°facture’ in ‘field list’ [for Statement “INSERT INTO `biogal`.`ligbl`(`dp`, `a d`, `prod`, `quant`, `prix u`, `t`, `r`, `client`, `date`, `l`, `x`, `mois`, `nb cartons`, `n0 lot`, `date peremption`, `conditionnement`, `cond`, `pmp`, `prix_devise`, `tarif`, `devise`, `cours`, `nouvnumcom`, `rcno`, `n°facture`, `désignation`, `année`, `n°commande`, `n°bl`) VALUES (‘M06’, ‘’, ‘T.D’, -1, 90000, 19, 0, 20491, ‘2020-07-22 00:00:00’, 1, NULL, NULL, 0, ‘’, ‘1980-01-01 00:00:00’, 1, ‘’, 0, NULL, NULL, NULL, NULL, ‘0’, ‘243364’, NULL, ‘Temps de d�placement’, NULL, ‘157708’, ‘2002471’) /_percona-toolkit src\_db:biogal src\_tbl:ligbl src\_dsn:A=utf8mb4,h=10.8.0.11,p=…,u=root dst\_db:biogal dst\_tbl:ligbl dst\_dsn:A=utf8mb4,h=127.0.0.1,p=…,u=root lock:0 transaction:1 changing\_src:0 replicate:0 bidirectional:0 pid:28556 user:root host:biom_/”] at line 10946 while doing biogal.ligbl on 127.0.0.1  
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23:31:12 23:31:43 1&nbsp;&nbsp;&nbsp; biogal.ligbl  
I also tried with only A and&nbsp; only --charset

---

<div class="post-metadata">

### Author: ![mbcheikh](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mbcheikh](https://forums.percona.com/u/mbcheikh)
#### Post date: [July 27, 2020, 6:26am UTC](https://forums.percona.com/t/pt-table-sync-error-character-encoding/7793/4 "2020-07-27T06:26:09Z")

</div>

Ok! It works perfectly (for now) wiith 2.2.20 version of percona-toolkit,&nbsp; without --charset=utf8 or A.
