> > > - length() on the server side doesn't handle correctly Unicode [I
> > > have the same result with char_length()], and returns the number
> > > of chars (as it is however advertised to do), rather the length
> > > of the string.
> >
> > This is a known limitation.
>
> To solve this, we could use wcwidth() (there is a custom
> implementation for the systems which don't have it in the glibc). I'll
> have a look at it later.
And wcwidth() depends on the locale. That is the another reason we
could not use it.
> As Oleg suggested, I will try to aim for 7.3, first with a version in
> contrib, and later, if the implementation is fine, it could be moved
> to the core (or not ? Though it would be nice to make sure every
> PostgreSQL installation which supports unicode has it, so that users
> won't need to have administrative rights to use the functionality).
I would like to see SQL99's charset, collate functionality for 7.3 (or
later). If this happens, current multibyte implementation would be
dramatically changed. That would be a good timing to merge your
Unicode stuffs into the main source tree.
--
Tatsuo Ishii