Re: Mixed UTF8 / Latin1 database - Mailing list pgsql-general

From Jean-Michel POURE
Subject Re: Mixed UTF8 / Latin1 database
Date
Msg-id 200404161626.24868.jm@poure.com
Whole thread Raw
In response to Mixed UTF8 / Latin1 database  (Claudio Cicali <c.cicali@mclink.it>)
Responses Re: Mixed UTF8 / Latin1 database
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PLpgSQL-Problem
Next
From: Giorgio Valoti
Date:
Subject: Locale support on Mac OS X