Funny characters in my db

Posted by hdx on Stack Overflow See other posts from Stack Overflow or by hdx
Published on 2010-08-16T21:59:19Z Indexed on 2010/12/24 14:54 UTC
Read the original article Hit count: 284

My web app is breaking when I try edit a certain content type and I'm pretty sure it is because of some weird characters in my database. So when I do:

SELECT body FROM message WHERE id = 666

it returns:

<p>⢠<span></span></p><p><br /></p><p><em><strong>NOTE:</strong> Please remember to use your to participate in the discussion.</em></p>

However when I try to count how many documents have those characters postgres complains:

foo_450_prod=# SELECT COUNT(*) FROM message WHERE body LIKE'%â¢%';

ERROR:  invalid byte sequence for encoding "UTF8": 0xe2a225
HINT:  This error can also happen if the byte sequence does not match the encodi

Does anybody know what the issue is and how I can query for those funny characters?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about database

Related posts about postgresql