From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Install Darwin's locale library on your system :) |
Date: | 2005-09-05 21:59:33 |
Message-ID: | 20050905215928.GB5278@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Well, it was pointed out the other day that the Darwin C library
supports the non-standard extensions to the POSIX locale interface and
that this might be ported to other systems so PostgreSQL could use it.
So, I have written a few scripts which download the libc and locale
library from darwinsource, shuffle some files around and build the
result into a library called libdummylocale.so. It basically completely
replaces your locale support on whatever system you use it on.
It's all under the APSL, though some parts may be BSD licenced.
Let me say right now, the locale support here sucks, no two ways about
it. It doesn't support a single UTF-8 locale. Oh, it lets you specify
them, but when you ask for the CHARSET it still says US-ASCII. It does
support a number of other different charsets. (Not for collation
though).
So my challenge to those people who think maintaining a locale library
is easy: make *one* locale in FreeBSD (or Darwin or this lib) support
full UTF-8 collation in whatever locale and/or charset you choose. It's
all downhill from there.
While it builds simple programs, I don't think it's totally safe. You'd
need to rename the headers at least. And building on Darwin will
probably blow up due to the way it plays fast and loose with Darwin
specific #defines. But it's a beginning if anyone is interested. It
builds in my glibc system.
I'm going to drop the idea of making a locale library, there's just
nothing good enough. glibc is the only thing that comes close. From here
on I'm going to work on COLLATE for systems that support xlocale, with
an eye on ICU if/when it becomes standard enough.
Download: http://svana.org/kleptog/pgsql/dummylocale.tar.gz
Have a nice day,
--
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-09-05 22:54:05 | Re: statement logging / extended query protocol issues |
Previous Message | Chris Traylor | 2005-09-05 20:31:06 | Re: 4D Geometry |