Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48A354DC6 for ; Wed, 15 Jun 2011 13:38:31 +0000 (UTC) Received: (qmail 82387 invoked by uid 500); 15 Jun 2011 13:38:29 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 82357 invoked by uid 500); 15 Jun 2011 13:38:29 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 82349 invoked by uid 99); 15 Jun 2011 13:38:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 13:38:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.212.52 as permitted sender) Received: from [209.85.212.52] (HELO mail-vw0-f52.google.com) (209.85.212.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 13:38:22 +0000 Received: by vws16 with SMTP id 16so397666vws.11 for ; Wed, 15 Jun 2011 06:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=2NjHDFoqLJkHVn5/ywC3OJfsXc5kCZ+w5w9iyMLHBg0=; b=P7EmxcD7U4juycGsesNcJUtZQyZH/GrbRuRB5WsEo7oFF1ME4AfRqgvE+Y9JHJm8zV 4U8rHOaO7FQ9HOYsJsV7isn+fAO7iWyuMGomvZtcooNVfW7Bzw4CzfaQTusfNwiHwX53 ctiqOYqhj0LWu66oFnjlknDUHgB88JZUnQQ3c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=KC5f7cMIz3qTaoLRXwW1Kl5P5wtzSpEOeYMtkby6mWso/UOsZhrIGr7yDpG/kSrD4H rV2flwbBxGJLGZ2jXESdiGCBFmHUkd397WyObONtzxW83CZYnkrjSWAHN+yv3a2kKCie 4WpYVYLGujh4GzoD4FDJTxu106lB8UeIw8rBo= Received: by 10.52.176.10 with SMTP id ce10mr745714vdc.280.1308145081073; Wed, 15 Jun 2011 06:38:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.161.100 with HTTP; Wed, 15 Jun 2011 06:37:20 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Wed, 15 Jun 2011 09:37:20 -0400 Message-ID: Subject: =?ISO-8859-1?Q?Re=3A_Does_couchdb_treat_o_or_=F8_or_=F4_the_same_way=3F?= To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 wr= ote: > Hi, > First sorry if this was discussed but I couldn't find information. > > Given a simple document: > { =C2=A0 "type": "user", =C2=A0 "name": "george"} > > And a even more simple view to find user with the start of their username= : > function(doc) { > =C2=A0if (doc.type =3D=3D "user"){ > =C2=A0 =C2=A0emit(doc.name, doc); > =C2=A0} > } > 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=3D= %22geo%22&endkey=3D%22geo=E9=A6=99%22 > > However if I search on ge=C3=B8 or ge=C3=B4 I still get george back: > http://localhost:5984/test_db/_design/User/_view/user_by_name?startkey=3D= %22ge=C3=B8%22&endkey=3D%22ge=C3=B8=E9=A6=99%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=C3=A9" (tea in french) and not getting back "the coffee"? > > Thanks for helping. > > Julien >