I have a postgresql database I would like to convert to UTF-8.
The problem is that it is currently SQL_ASCII, so hasn\'t been doing any kind of encoding conversion o
It is impossible without some knowledge of the data first. Do you know if it is a text message or people's names or places? In some particular language?
You can try to encode a line of a dump and apply some heuristic — for example try an automatic spell checker and choose an encoding that generates the lowest number of errors or the most known words etc.
You can use for example aspell list -l en
(en
for English, pl
for Polish, fr
for French etc.) to get a list of misspelled words. Then you can choose encoding which generates the least of them. You'd need to install corresponding dictionary package, for example "aspell-en" in my Fedora 13 Linux system.