Re: Trouble with Mixed UTF-8 and Latin1 data

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: valgog <valgog(at)gmail(dot)com>
Subject: Re: Trouble with Mixed UTF-8 and Latin1 data
Date: 2008-02-10 20:51:18
Message-ID: 47AF63C6.6080506@theendofthetunnel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

valgog wrote:
I know it looks like a mess

Indeed, that is what client encoding is for :)

> One idea is to write the function, that will normalize the data to
> UTF-8 in PL/pgSQL (that I could not do from the first try)

You could use convert(), iterate over the rows and catch the exceptions
in pl/pgsql.

http://www.postgresql.org/docs/8.3/interactive/functions-string.html
http://www.postgresql.org/docs/8.3/interactive/plpgsql-control-structures.html

--
Best regards,
Hannes Dorbath

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pierre Thibaudeau 2008-02-10 21:41:34 8.3: where's the replacement tsearch2 module?
Previous Message Dave Livesay 2008-02-10 20:32:43 Re: ERROR: expected just one rule action