From: Thusitha Kodikara <kthusi@yahoo.com>
To: Ivo Rossacher <rossacher@bluewin.ch>
To: pgsql-admin@postgresql.org
Subject: Re: invalid UTF-8 byte sequences and iconv
Date: Tue, 25 Jul 2006 19:15:57 -0700 (PDT)
Message-ID: <20060726021557.89937.qmail@web56603.mail.re3.yahoo.com> (raw)
In-Reply-To: <200607252158.47484.rossacher@bluewin.ch>
Hello,
We had a similar problem a few weeks back converting from PostgreSQL 7.3.10 to 7.4.13. After trying various methods, including iconv, we found that the one that worked in our case was to manually fix the data - which was only about 15 records fortunately.
BTW thanks Ivo for suggesing that solution at that instance also :)
Regards,
-Thusitha
Ivo Rossacher <rossacher@bluewin.ch> wrote: In earlier version of postgres the database did allow to store invalid byte
sequences. The newer versions do check correctly for the byte sequences and
do not allow invalid sequences. So if your dump is really in UTF8 already you
will have to search for the invalid sequences in the dump and replace them
with the correct one. (if you have a lot of them and a big dump recode might
by of help for you). If the dump is not UTF8 you have to pass the correct
encoding to iconv in the procedure you described.
Best regards
Ivo
Am Dienstag, 25. Juli 2006 21.04 schrieb Karen Springer:
> Hi,
>
> We have set up a new server and are needing to move our database from
> 7.3 to 8.1.4. On restore I'm getting the 'invalid UTF-8 byte sequence'
> error message. If I use the command iconv -c -f UTF-8 -t UTF-8 -o
> cleanfile.sql dumpfile.sql, then the characters are deleted and the
> restore goes smoothly. The problem is that we want those characters.
> They are for example the degree symbol and the micro symbol. Is there
> anyway to bring these characters over? Thanks in advance.
>
> Karen
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: kthusi@yahoo.com, rossacher@bluewin.ch
Subject: Re: invalid UTF-8 byte sequences and iconv
In-Reply-To: <20060726021557.89937.qmail@web56603.mail.re3.yahoo.com>
References: <200607252158.47484.rossacher@bluewin.ch> <20060726021557.89937.qmail@web56603.mail.re3.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox