Re: invalid UTF-8 byte sequences and iconv

From: Ivo Rossacher <rossacher(at)bluewin(dot)ch>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: invalid UTF-8 byte sequences and iconv
Date: 2006-07-25 19:58:47
Message-ID: 200607252158.47484.rossacher@bluewin.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alexander Burbello 2006-07-25 20:16:27 Restore and Recover Database
Previous Message Alvaro Herrera 2006-07-25 19:29:37 Re: invalid UTF-8 byte sequences and iconv