Re: Inserting greek letters - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Inserting greek letters
Date
Msg-id 20041126151422.GC26060@svana.org
Whole thread Raw
In response to Inserting greek letters  (Adam Witney <awitney@sghms.ac.uk>)
Responses Re: Inserting greek letters
List pgsql-general
On Fri, Nov 26, 2004 at 02:52:18PM +0000, Adam Witney wrote:
> Do I have to have created the database with UNICODE encoding to do this?
> Also, is there anything in the PHP I have to adjust to be able to store the
> data and display the data?

Obviously, your database needs to be able to store the characters.
Unicode is good for this because it can store almost anything, but
depending on the specific character the encoding you're using may be
fine.

As for PHP, you need to have the browser and PHP agree on what
character set they're going to use. Then you set the client encoding
appropriately and PostgreSQL will make sure you get the information you
expect.

As a final note, you could always store your fancy characters as HTML
entities, then you could store them anywhere, but then also PostgrSQL
will not be able to do any conversion for you...

hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Adam Witney
Date:
Subject: Inserting greek letters
Next
From: Adam Witney
Date:
Subject: Re: Inserting greek letters