SOLVED: Re: [OGo-Users] Umlauts problem after upgrade

Andreas Gredler users@opengroupware.org
Thu, 1 Feb 2007 18:08:22 +0100


On Wed, Jan 31, 2007 at 09:18:47AM +0100, Florian Reitmeir wrote:
> On Mit, 31 Jän 2007, Andreas Gredler wrote:

> > One problem remains. When I restore the database I get a couple of these
> > messages: invalid byte sequence for encoding "UNICODE".
> > It seems that the database doesn't get restored correctly because of
> > this error (e.g. address table is empty).
> > Tried iconv but it didn't help. Did you have the same problem?
> 
> then..
> edit the dump and remove the line:
> CLIENT ENCODING .. on the beginning
> and use a tool like "recode" to recode the dump
> recode LATIN1..UTF8 <dumpfile>

Thx a lot for your help. Finally it worked. Only one character was
converted wrong. But this is ok since it was the test "TODO" that I
created after the upgrade when all encodings where messed up.

Finally all steps again:
- su - root
- # /etc/init.d/opengroupware.org stop
- # exit
- su - ogo
- pg_dump ogo > dump_file
- createdb -E UTF8 ogo-utf8 -O ogo -T template0 (-T template0 is
  mandatory)
- recode -v LATIN1..UTF8 dump_file
- cat dump_file | psql ogo-utf8 ogo
- exit
- su - root
- Edit /etc/opengroupware.org/ogo/Defaults/NSGlobalDomain.plist to use
  the new database
- # /etc/init.d/opengroupware.org start

I simply used the new database instead of deleting the original one and
dumping back with the same name again. In this case: Remember to change
your backup scripts ;-)

greets Jimmy

-- 
                 Andreas "Jimmy" Gredler 
   ,'"`.         http://www.jimmy.co.at/ | jimmy@g-tec.co.at
  (  grml.org -» Linux Live-CD for texttool-users and sysadmins
   `._,          http://www.grml.org/    | jimmy@grml.org