Re: [sqlite] ICU collation

2009-12-22 Thread Sylvain Pointeau
Igor, you didn't understand my sentence, I said that I would be stupid to not use ICU as it is already used by sqlite... means I want to use ICU and nothing else, because it is used in sqlite. BUT I find that the ICU extensions should provide a function to normalize a string, it would have me to

Re: [sqlite] ICU collation

2009-12-22 Thread Igor Tandetnik
Sylvain Pointeau wrote: > by the way, I will not use other thing than ICU to implement it > because I > already use it with sqlite then I would be really stupid to change > again of > API... don't you agree? No, I don't understand this point at all. SQLite uses fopen to open files and malloc

Re: [sqlite] ICU collation

2009-12-22 Thread Sylvain Pointeau
you probably think that I criticize sqlite, that's may why you answer in this way. ... but I am not, I would just like that when ICU is compiled with, to provide one or more function to use the rules of collation from ICU (you know the ö=oe etc). In fact I am asking nothing to sqlite but to the IC

Re: [sqlite] ICU collation

2009-12-22 Thread Igor Tandetnik
Sylvain Pointeau wrote: > yes this is what I meant in my previous email, > but still another api to use ... Well, your choice: use another API that already exists, or wait for another API that currently doesn't. > It would have been easier if everything came from sqlite. If _everything_ came

Re: [sqlite] ICU collation

2009-12-22 Thread Sylvain Pointeau
yes this is what I meant in my previous email, but still another api to use ... It would have been easier if everything came from sqlite. (a new feature then? :-)) Best regards, Sylvain On Tue, Dec 22, 2009 at 7:54 PM, Igor Tandetnik wrote: > Sylvain Pointeau > wrote: > > ok then to do it on t

Re: [sqlite] ICU collation

2009-12-22 Thread Igor Tandetnik
Sylvain Pointeau wrote: > ok then to do it on the application side but why sqlite does not > provide simple functions along with ICU to normalize a string > following a specified locale? Then I will be able implement it on the > application layer. You can just use ICU directly in your applicati

Re: [sqlite] ICU collation

2009-12-22 Thread Sylvain Pointeau
ok then to do it on the application side but why sqlite does not provide simple functions along with ICU to normalize a string following a specified locale? Then I will be able implement it on the application layer. I think that trying to re-implement myself the rules ä=ae ü=ue is waste of time, a

Re: [sqlite] ICU collation

2009-12-22 Thread Nicolas Williams
On Tue, Dec 22, 2009 at 07:49:24AM -0500, Tim Romano wrote: > On 12/22/2009 5:31 AM, Sylvain Pointeau wrote: > > It cannot be done in the application layer... > > > You are wrong about that. I have written a full-text search application > to go against ancient Germanic texts where, for example

Re: [sqlite] ICU collation

2009-12-22 Thread Tim Romano
Sylvain, Here is a link I provided earlier, showing how normalization can be done in the application layer: http://php.net/manual/de/normalizer.normalize.php Regards Tim Romano ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:808

Re: [sqlite] ICU collation

2009-12-22 Thread Tim Romano
On 12/22/2009 5:31 AM, Sylvain Pointeau wrote: > It cannot be done in the application layer... > You are wrong about that. I have written a full-text search application to go against ancient Germanic texts where, for example, there were two dozen ways to spell the word for modern English 'sis

Re: [sqlite] ICU collation

2009-12-22 Thread Simon Slavin
On 22 Dec 2009, at 10:55am, Jean-Denis Muys wrote: > On 12/22/09 11:31 , "Sylvain Pointeau" wrote: > >> Imagine that I want to query my database for a certain type of word, >> the user could enter ü or ue and I will display the corresponding items... >> >> It cannot be done in the application

Re: [sqlite] ICU collation

2009-12-22 Thread Jean-Denis Muys
On 12/22/09 11:31 , "Sylvain Pointeau" wrote: > Imagine that I want to query my database for a certain type of word, > the user could enter ü or ue and I will display the corresponding items... > > It cannot be done in the application layer... > Or maybe it can... You could for example mainta

Re: [sqlite] ICU collation

2009-12-22 Thread Sylvain Pointeau
Imagine that I want to query my database for a certain type of word, the user could enter ü or ue and I will display the corresponding items... It cannot be done in the application layer... Best regards, Sylvain On Tue, Dec 22, 2009 at 8:15 AM, Nicolas Williams wrote: > On Tue, Dec 22, 2009 at

Re: [sqlite] ICU collation

2009-12-21 Thread Nicolas Williams
On Tue, Dec 22, 2009 at 06:56:29AM +, Simon Slavin wrote: > On 22 Dec 2009, at 4:55am, Sylvain Pointeau wrote: > > How is [this?] supposed to work ICU in SQLite? > > I hope someone can answer your question. I don't know enough. I don't know about ICU but, really this is something that needs

Re: [sqlite] ICU collation

2009-12-21 Thread Simon Slavin
On 22 Dec 2009, at 4:55am, Sylvain Pointeau wrote: > 04: flusse > 05: fluße > 36 42 54 50 50 34 00 This is a German spelling reform matter. The system is making sure that text typed before the spelling reform matches text typed after the spelling reform. Technically speaking, whichever langu

Re: [sqlite] ICU collation

2009-12-21 Thread Sylvain Pointeau
Hi, thanks for your help, I also found that L1 = Base Letters worked as I expected ... *Collated* 09: fluasse 36 42 54 2c 50 50 34 00 06: flüße 07: flüsse 08: fluesse 36 42 54 34 50 50 34 00 02: Fluße 03: Flusse 04: flusse 05: fluße 36 42 54 50 50 34 00 01: Fuße 36 54 50 50 34 00 How is supposed

Re: [sqlite] ICU collation

2009-12-21 Thread Igor Tandetnik
Olaf Schmidt wrote: >> As I see it - one has different (fine-tuning) options for >> ICU, which work "on top" of a choosen "base-setting". >> If I set the first entry (all others remain at their defaults) to: >> L1 = Base Letters >> >> then ICU behaves IMO in the way the OP wants it to. >> ae >> á

Re: [sqlite] ICU collation

2009-12-21 Thread Olaf Schmidt
"Igor Tandetnik" schrieb im Newsbeitrag news:hgom0b$u0...@ger.gmane.org... Sylvain Pointeau wrote: > > How does sqlite handle ICU, I don't understand? > > is it used only for the sort order? > No, the collation is used both for sorting and for equality check. > However, ICU doesn't actually tre

Re: [sqlite] ICU collation

2009-12-21 Thread Igor Tandetnik
Sylvain Pointeau wrote: > How does sqlite handle ICU, I don't understand? > is it used only for the sort order? No, the collation is used both for sorting and for equality check. However, ICU doesn't actually treat 'ä' as equal to 'ae'. You can see for yourself here: http://demo.icu-project.or

Re: [sqlite] ICU collation

2009-12-21 Thread Sylvain Pointeau
How does sqlite handle ICU, I don't understand? is it used only for the sort order? Best regards, Sylvain On Mon, Dec 21, 2009 at 12:41 AM, Sylvain Pointeau < sylvain.point...@gmail.com> wrote: > it is written here > http://userguide.icu-project.org/collation >

Re: [sqlite] ICU collation

2009-12-20 Thread Sylvain Pointeau
it is written here http://userguide.icu-project.org/collation "A letter can be treated as if it were two letters. For example, in traditional German "ä" is compared as if it were "ae"." On Mon, Dec 21, 2009 at 12:04 AM, Sylvain Pointeau < sylvain.po

Re: [sqlite] ICU collation

2009-12-20 Thread Sylvain Pointeau
I am pretty sure that ICU should handle those cases. Please note that I tried "=" and "like" for that without any luck. On Sun, Dec 20, 2009 at 7:37 PM, Wolfgang Enzinger wrote: > Am Sun, 20 Dec 2009 19:24:58 +0100 schrieb Wolfgang Enzinger: > > > I'm pretty sure they don't query their database f

Re: [sqlite] ICU collation

2009-12-20 Thread Wolfgang Enzinger
Am Sun, 20 Dec 2009 19:24:58 +0100 schrieb Wolfgang Enzinger: > I'm pretty sure they don't query their database for " = 'schön'" but for > "LIKE 'schön'". Correction: I'm pretty sure they don't query their database for " = 'schoen'" but for "LIKE 'schoen'". ___

Re: [sqlite] ICU collation

2009-12-20 Thread Wolfgang Enzinger
Am Sun, 20 Dec 2009 14:45:15 +0100 schrieb Sylvain Pointeau: > if you go on http://www.dict.cc and type "schoen" then it will give you >the answers "schön" ... I'm pretty sure they don't query their database for " = 'schön'" but for "LIKE 'schön'". And that's exactly what it is: like, but not eq

Re: [sqlite] ICU collation

2009-12-20 Thread Tim Romano
You can see how some people handle this situation here, Sylvain: http://php.net/manual/de/normalizer.normalize.php If you want umlauted 'a' (ä) to be treated the same as the two characters 'ae' (such treatment is an older convention from the days of typewriters later adopted for ASCII) the appl

Re: [sqlite] ICU collation

2009-12-20 Thread Jan
Hi, I think in 99% of all cases ö, ü, ä is equal to oe, ue, ae but I have no idea about ICU. Actually ö evolved from oe (I just learned that from wikipedia .-) ). But there are some words like 'tu' (doing) with a form like e.g. 'Ich tue ...' (I am doing ...') where 'tue' is of course not equ

Re: [sqlite] ICU collation

2009-12-20 Thread Sylvain Pointeau
Hi, if you go on http://www.dict.cc and type "schoen" then it will give you the answers "schön" ... I thought that using ICU, I could interrogate my database in the same way. (I am doing this kind of application for students only) I am actually learning german and my teacher

Re: [sqlite] ICU collation

2009-12-19 Thread Simon Slavin
On 20 Dec 2009, at 5:29am, Sylvain Pointeau wrote: > but in german, "*schön*" > can be written "schoen" right? In German German, the rules is that one can do this only when using equipment in which the umlaut does not appear. For instance, p

Re: [sqlite] ICU collation

2009-12-19 Thread Sylvain Pointeau
but in german, "*schön*" can be written "schoen" right? On Sat, Dec 19, 2009 at 10:16 PM, Igor Tandetnik wrote: > Sylvain Pointeau wrote: > > please could someone help me to understand ICU inside SQLite? > > > > I have some text fields for the

Re: [sqlite] ICU collation

2009-12-19 Thread Igor Tandetnik
Sylvain Pointeau wrote: > please could someone help me to understand ICU inside SQLite? > > I have some text fields for the German language. > I load the collation with : > SELECT icu_load_collation('de_DE', 'GERMAN'); > > the sort order is good, means it sorts correctly the ä,ö etc > > but it d

[sqlite] ICU collation

2009-12-19 Thread Sylvain Pointeau
Hi, please could someone help me to understand ICU inside SQLite? I have some text fields for the German language. I load the collation with : SELECT icu_load_collation('de_DE', 'GERMAN'); the sort order is good, means it sorts correctly the ä,ö etc but it doesn't try to select: "ä" if I use "a