Search Postgresql Archives

Re: Eliminating bad characters from a database for upgrading from 7.4 to 8.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Nov 16, 2006, at 10:38 PM, Gregory S. Williamson wrote:

Try converting the dump files encoding to UTF-8.  before 8.1 you could
insert invalid characters into the DB because it accepted other
encodings.  It will also dump other encoding.  For example, converting
something with windows characters in it.

iconv -f "WINDOWS-1251" -t "UTF-8" dump_file > converted_dump_file

And import the converted file.  you may need to try a couple of
different input encodings if you aren't sure what encoding was used when
inserting data into the DB.

I had a similar situation a few months back. I just ended up doing a translation from UTF8 to UTF8 and dropping bad characters. The db itself had multiple different encodings for different records: some were windows encoding, some were other. It was just a mess. I'm glad 8.1 is more strict about this!

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux