Re: Unicode combining characters

Поиск
Список
Период
Сортировка
От Patrice Hédé
Тема Re: Unicode combining characters
Дата
Msg-id 20010925201420.O1316@idf.net
обсуждение исходный текст
Ответ на Re: Unicode combining characters  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Ответы Re: Unicode combining characters
Список pgsql-hackers
Hi,

* Tatsuo Ishii <t-ishii@sra.co.jp> [010925 18:18]:
> > So, this shows two problems :
> > 
> > - 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.

> > - the psql frontend makes the same mistake.

Same thing here.

I have just installed the CVS and downloaded the development version
(thanks Baldvin), tested that the stock version compiles fine, and
I'll now have a look at how to make this work. :) I'll send a patch
when I have this working here.

> Sounds great.

[Unicode normalisation and collation in the backend]

> I'm very interested in your point. I will start studying [1][2] after
> the beta freeze.
> 
> > Anyway, I'm open to suggestions :
> > 
> > - implement it in C, in the core,
> > 
> > - implement it in C, as contributed custom functions,
> 
> This may be a good starting point.
> 
> > I can't really accept a solution which would rely on the underlaying
> > libc, as it may not provide the necessary locales (or maybe, then,
> 
> I totally agree here.

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 think I will go for a C version, and probably the collation and
normalisation data in tables, with some way to override the defaults
with secondary tables... I'll report as soon as I have something +/-
working.

> --
> Tatsuo Ishii

Patrice.

-- 
Patrice HÉDÉ ------------------------------- patrice à islande org ----- --  Isn't it weird  how scientists  can
imagine all the matter of the
 
universe exploding out of a dot smaller than the head of a pin, but they
can't come up with a more evocative name for it than "The Big Bang" ? -- What would _you_ call the creation of the
universe? -- "The HORRENDOUS SPACE KABLOOIE !"               - Calvin and Hobbes
 
------------------------------------------ http://www.islande.org/ -----



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: overlaps operator for time type(s)
Следующее
От: Jean-Michel POURE
Дата:
Сообщение: Alter project: client or server side?