pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Schuldei <andreas@schuldei.org>
To: pgsql-admin@postgresql.org
Subject: how to dump and restore unicode databases?
Date: Tue, 17 Dec 2002 23:48:18 +0100
Message-ID: <20021217224818.GA10840@lukas> (raw)

i have two machines, one with postgres 7.2.X and one with 7.3.
Both their encodings are set to UNICODE.
on the first i have crated a unicode database, with german,
swedish and english texts, more to come. on that machine i dump
the db with pg_dump -c -s ncg and pg_dump -D -a ncg. on that
machine i can restore the structure and data of the database just
fine.

I also edit the dump to use the coziness of my texteditor to add
larger amounts of text. i can restore those edited dumps just fine.

then i try to restore that database on the postgres 7.3. since i
get errors like 
ERROR:  Invalid UNICODE character sequence found (0xe4636b)
whenever a german or swedish special char occurs, i insert an
\ecoding LATIN1 before the critical sections.

then i can restore the complete database, with the difference
that the special characters are garbage: รถ and similar.

How can i dump unicode databases to asci so that they are
restored as unicode? i would like to edit the dump, as explained
above.

or 

How can i restore the database with its special chars in tact?



Message-ID: <20021217224818.GA10840@lukas>
Permalink:  ../20021217224818.GA10840@lukas/
Also on:    postgresql.org/message-id/20021217224818.GA10840@lukas

 · 

reply

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: andreas@schuldei.org
  Subject: Re: how to dump and restore unicode databases?
  In-Reply-To: <20021217224818.GA10840@lukas>
  References: <20021217224818.GA10840@lukas>

* 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