pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Hodgson <ahodgson@simkin.ca>
To: pgsql-general@postgresql.org
Subject: Re: ERROR:  invalid byte sequence for encoding "UTF8": 0xc325
Date: Fri, 30 Mar 2012 10:44:25 -0700
Message-ID: <1985506.VxWsIU199R@skynet.simkin.ca> (raw)
In-Reply-To: <1333126831.8513.YahooMailClassic@web125702.mail.ne1.yahoo.com>
References: <1333126831.8513.YahooMailClassic@web125702.mail.ne1.yahoo.com>

On Friday, March 30, 2012 10:00:31 AM Prashant Bharucha wrote:
> Hello All
> 
> Could you help me to automatically convert all db request into UTF8 encode ?
> 

Set your session client_encoding to match your data. That's about as close as 
you can get to automatic.

  http://www.postgresql.org/docs/9.1/static/multibyte.html

A better bet is to make your application end-to-end UTF8, which is doable, 
more or less, in a web environment, although misbehaving clients will still 
sometimes send you bad data. For any other data source (especially email) 
you'll probably get tons of badly encoded data.

If you're looking for a silver bullet, there isn't one.




view thread (19+ messages)  latest in thread

Message-ID: <1985506.VxWsIU199R@skynet.simkin.ca>
Permalink:  ../1985506.VxWsIU199R@skynet.simkin.ca/
Also on:    postgresql.org/message-id/1985506.VxWsIU199R@skynet.simkin.ca

 · 

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-general@postgresql.org
  Cc: ahodgson@simkin.ca
  Subject: Re: ERROR:  invalid byte sequence for encoding "UTF8": 0xc325
  In-Reply-To: <1985506.VxWsIU199R@skynet.simkin.ca>
  References: <1333126831.8513.YahooMailClassic@web125702.mail.ne1.yahoo.com> <1985506.VxWsIU199R@skynet.simkin.ca>

* 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