Re: PostgreSQL, UTF-8 and Mac OS X

From: Guido Neitzer <guido(dot)neitzer(at)pharmaline(dot)de>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL, UTF-8 and Mac OS X
Date: 2005-11-07 13:28:05
Message-ID: ADF3A8FA-79A5-4FE4-9973-D0CF1A009C37@pharmaline.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07.11.2005, at 14:07 Uhr, Martijn van Oosterhout wrote:

> We had this question earlier this week. Mac OS X uses the locales from
> FreeBSD, and neither support UTF-8 collation at all. You'll see
> exactly
> the same results from other UNIX utilities.

I think I was the one who asked.

I worked on my locale problem on the weekend and was able to build a
LC_COLLATE file, that actually works with ISO locales, but not with
UTF-8 (50% progress ... ;-)).

When you test the UNIX utility "sort" on Mac OS X, you should be
aware, that the pre-installed version on Mac OS X ignores locales at
all ... :-( I had to install the gnu coreutils to get a sort that
works with locales, and this also fails on UTF-8 but works with ISO
encoding/collate - same as PG does.

Now I'm not sure, whether my own LC_COLLATE file is not appropriate
for UTF-8 (why not?) or whether Mac OS X locale does not support
UTF-8 at all as you state.

> Sometime in the near future (hopefully) PostgreSQL will provide locale
> support independant of the underlying operating system, but for now
> you're stuck.

Will be cool to have locale support directly in PostgreSQL.

So, just a quick question regarding a switch: is there a problem with
using ISO8859-15 for now, and do a switch later with dumping the data
and import it to a newer version which should then use UTF-8? Do I
need to do some conversion or how does this work?

Thanks for your help!
cug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-11-07 14:24:08 Re: Aggregates, group, and order by
Previous Message Martijn van Oosterhout 2005-11-07 13:07:26 Re: PostgreSQL, UTF-8 and Mac OS X