Re: Trouble with Mixed UTF-8 and Latin1 data - Mailing list pgsql-general

From Hannes Dorbath
Subject Re: Trouble with Mixed UTF-8 and Latin1 data
Date
Msg-id 47AF63C6.6080506@theendofthetunnel.de
Whole thread Raw
In response to Trouble with Mixed UTF-8 and Latin1 data  (valgog <valgog@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Dave Livesay
Date:
Subject: Re: ERROR: expected just one rule action
Next
From: "Pierre Thibaudeau"
Date:
Subject: 8.3: where's the replacement tsearch2 module?