Best way to correct garbled data caused by false encoding

Posted by ercan on Stack Overflow See other posts from Stack Overflow or by ercan
Published on 2010-03-09T14:59:03Z Indexed on 2010/03/14 10:25 UTC
Read the original article Hit count: 203

Hi all,

I have a set of data that contains garbled text fields because of encoding errors during many import/exports from one database to another. Most of the errors were caused by converting UTF-8 to ISO-8859-1. Strangely enough, the errors are not consistent: the word 'München' appears as 'München' in some place and as 'MÃœnchen'.

Is there a trick in SQL server to correct this kind of crap? The first thing that I can think of is to exploit the COLLATE clause, so that ü is interpreted as ü, but I don't exactly know how. If it isn't possible to make it in the DB level, do you know any tool that helps for a bulk correction? (no manual find/replace tool, but a tool that guesses the garbled text somehow and correct them)

© Stack Overflow or respective owner

Related posts about encoding

Related posts about sql-server-2005