Re: Mixed UTF8 / Latin1 database

From: Jean-Michel POURE <jm(at)poure(dot)com>
To: Claudio Cicali <c(dot)cicali(at)mclink(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Mixed UTF8 / Latin1 database
Date: 2004-04-16 14:26:24
Message-ID: 200404161626.24868.jm@poure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I'm wondering if anyone could have a script or something to help me
> with this situation... :(

Knowing that Unicode is composed of plain ASCII characters,
you may perform a conversion test using PHP "recode" function.

You may test each record as follows:

$test = recode ("latin1..u8", $record);

If the $test value differs from the $record one, then it is a Latin1 string.

On the converse, it is Unicode UT-8. There is no garantee. Make a test on a
few values, I am not coding right now and only have access to email.

Cheers,
Jean-Michel

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Giorgio Valoti 2004-04-16 14:41:57 Locale support on Mac OS X
Previous Message Tom Lane 2004-04-16 14:13:41 Re: PLpgSQL-Problem