Database encoding correction script

Sometimes we run into databases that aren’t encoded properly. The following is just one method of fixing a very specific type of improper encoding: doubly encoded characters from Latin-1 to UTF-8.


Download

All it’s really doing is enumerating the conversion pairs and running “update $1 set $2 = replace($2, ‘$3′, ‘$4′)” on them.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>