Re: Inserting greek letters

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inserting greek letters
Date: 2004-11-26 15:14:30
Message-ID: 20041126151422.GC26060@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Witney 2004-11-26 15:16:25 Re: Inserting greek letters
Previous Message Adam Witney 2004-11-26 14:52:18 Inserting greek letters