On 16 June 2011 01:37, Paul Davis <[email protected]> wrote: > This is due to how ICU collation works and how its not at all > intuitive when it comes to accents and other things. I think the > example that gave me a mind bending introduction was to create a view > that emits "a", "aa", "A", "AA" only to be suprised that it gets > sorted as "a", "A", "aa", "AA" which is nutty if you're only familiar > with asciibetical. > > HTH, > Paul Davis > > On Wed, Jun 15, 2011 at 3:43 AM, Julien Gagnet <[email protected]> > wrote: >> Hi, >> First sorry if this was discussed but I couldn't find information. >> >> Given a simple document: >> { "type": "user", "name": "george"} >> >> And a even more simple view to find user with the start of their username: >> function(doc) { >> if (doc.type == "user"){ >> emit(doc.name, doc); >> } >> } >> under User/user_by_name >> >> If I query this view with the start key 'geo' I get the expected >> 'george' user back: >> http://localhost:5984/test_db/_design/User/_view/user_by_name?startkey=%22geo%22&endkey=%22geo香%22 >> >> However if I search on geø or geô I still get george back: >> http://localhost:5984/test_db/_design/User/_view/user_by_name?startkey=%22geø%22&endkey=%22geø香%22 >> >> I not saying it's a bug but I would like to understand why this is >> happening. Is couch ignoring accented charater? How could I search for >> "thé" (tea in french) and not getting back "the coffee"? >> >> Thanks for helping. >> >> Julien
Salut Julien, You can find more about ICU at http://userguide.icu-project.org/intro but to my limited knowledge we only require it for view collation (the sorting you see above) http://userguide.icu-project.org/collation A+ Dave
