Re: utf8 database not dumping utf8 characters

From: Matt Williams <matt(at)williams-tech(dot)net>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: utf8 database not dumping utf8 characters
Date: 2012-04-06 20:10:46
Message-ID: 2F1A03239AE84E5F8217570AE41AA4C4@williams-tech.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

With that same dump file that is displaying incorrectly open in vim, I can paste in the utf8 character I provided as an example and it displays correctly.

--
Matt Williams
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, April 6, 2012 at 4:03 PM, Steve Crawford wrote:

> On 04/06/2012 12:55 PM, Matt Williams wrote:
> > I have a database that is utf8 and displays utf8 values correctly in psql. When dumped, it displays the utf8 characters incorrectly. ie. ö turns into Ã
> >
> > In the header of the dump file, I have:
> >
> > SET client_encoding = 'UTF8';
> >
> > So I'm not sure where the disconnect is?
> >
> > Thoughts?
> >
> > Thanks,
> >
> > --
> > Matt Williams
> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
> >
> With what are you viewing the dump file and is everything in the chain (terminal, less/vi/...) set to interpret/display that data as UTF8? You can always use a hex-dump program to see the actual bytes in the file and determine if they are what you expect for UTF8.
>
> Cheers,
> Steve
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Matt Williams 2012-04-06 20:11:07 Re: utf8 database not dumping utf8 characters
Previous Message Scott Whitney 2012-04-06 20:04:44 Re: utf8 database not dumping utf8 characters