SQL - Select all records with encoding errors

Asked

Viewed 41 times

1

Make a select in the database bringing all records with coding errors:

SELECT * FROM tabela WHERE titulo LIKE '%ÇÃ%'

Does anyone know another more efficient way?

1 answer

1


You can check data that is not in UTF-8 comparing the sizes:

SELECT * FROM suaTabela
WHERE LENGTH(suaColuna) != CHAR_LENGTH(suaColuna)

This will return all lines you have multibyte. Follows the source.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.