Re: UNICODE - Mailing list pgsql-general

From Tatsuo Ishii
Subject Re: UNICODE
Date
Msg-id 20011026091502K.t-ishii@sra.co.jp
Whole thread Raw
In response to UNICODE  ("Per Aronsson" <per@mobilehits.com>)
List pgsql-general
> To enable localization of our new platform, we thought that saving all
> character strings as UNICODE would be a good idea. Even if the front-end
> (PHP) doesn't fully support UNICODE yet, we figured it's still good to have
> the database in that format, for the future. We have not installed
> mb_string.
>
> We have created a UNICODE database and started experimenting with it
> (PostgreSQL)
> ./configure --enable-multibyte
> createdb -E UNICODE me-e
>
> My question is: do you need to convert strings to UTF-8 before adding them
> to the database, or is that done "automatically"?

PostgreSQL 7.1 can do the conversion in the backend side.  You need to
add an option "--enable-unicode-conversion", however. Also, you need
to tell what kind of encoding you are using in your applications. To
do it in PHP4, you could use pg_set_client_encoding function.
If your PHP installation does not have it, you could issue a SQL:

set client_encoding to 'encoding_name_in_your_PHP_applicatoion';
--
Tatsuo Ishii

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Triggers after insert
Next
From: Ren Weili
Date:
Subject: Chinese sort order problem