I’m working on a software that uses delphi and postgres 9.0,
the original developer had chosen the database encoding as ‘SQL_ASCII‘…
so we changed the encoding to UTF-8 for our database..
we we started getting this error after

Onclick of the One of the check boxes
(the form is populated from the database)
the query where the error comes is
‘select * from diary where survey in (‘2005407′)’;
but this error only comes for few of the check boxes and not ALL
The change is straight forward but we have large amount of historical data that we will have to re-store into the newly created UTF-8 database..so i followed the steps i found on the net and stackoverflow also
- Dump the database as e- UTF-8
SQL_Ascii_backup.backup -
Use iconv to convert SQL_ASCII to UTF-8
"C:\Program Files\GnuWin32\bin\iconv.exe" -f ISO8859-1 -t UTF-8 C:\SQL_Ascii_backup.backup>UTF_Backup.backup3.Create a new Database with encoding as UTF-8 and re-store the backup
UTF_Backup.backup
But when i try to restore it i get t his error

then i tried with dumping the original SQL_ASCII database as plain SQL_Ascii_.sql file
and then again i used iconv to change the encoding..and then restoring
>"C:\Program Files\PostgreSQL\9.0\bin\psql.exe"-h localhost -p 5434 -d myDB -U myDB_admin -f C:\converted_utf8.sql
this is restoring properly but im still geting the error.
‘character 0xc286 of encoding “UTF-8” has no equivalent in “WIN1252”;
C2 86 is the UTF-8 encoding of the character U+0086, an obscure C1 control character. This character exists in ISO-8859-1, but not in Windows’ default code page 1252, which has printable characters in the space where ISO-8859-1 has the C1 controls.
Your iconv command to convert to UTF-8 has
-f ISO8859-1, but your probably meant-f windows-1252instead. This maps the byte 86 to the†character.