Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 93D32431FD0 for ; Thu, 7 Jul 2011 04:37:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n9dq98w2FzJt for ; Thu, 7 Jul 2011 04:37:07 -0700 (PDT) Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D14A3431FB6 for ; Thu, 7 Jul 2011 04:37:06 -0700 (PDT) Received: by wwi14 with SMTP id 14so3851726wwi.2 for ; Thu, 07 Jul 2011 04:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=DjSA7RWJPQsXo0r1J7cRTSQ6UPhdSc41pc+hC80+RiY=; b=VwFL1jN4mshXjrrhHWkJuZ764D7+Wffp3PNwKH1+XXAZVWAW0glwdimV66c6zjf54u 2VMlDANU+B3SwnSfKrkJ+j1iO5/DfYQ0uqjZQpvxF5Ix8vlbu4fkSKaUSWi0UNB0QuHS T1hZ4bO4oq8F4snk6Xk4Zm73YSZ99pwl4uk+w= Received: by 10.216.69.77 with SMTP id m55mr624001wed.11.1310038625417; Thu, 07 Jul 2011 04:37:05 -0700 (PDT) Received: from megatron (dhcp-91-036.inf.ed.ac.uk [129.215.91.36]) by mx.google.com with ESMTPS id 74sm4724972wem.41.2011.07.07.04.37.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jul 2011 04:37:03 -0700 (PDT) Date: Thu, 7 Jul 2011 12:37:00 +0100 From: Patrick Totzke To: notmuch@notmuchmail.org Subject: [python] querystrings as unicode literals? Message-ID: <20110707113700.GA16347@megatron> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2011 11:37:07 -0000 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! Something strange goes on when I use unicode literals as querystrings: Database().create_query(u'teststring') yields different results than Database().create_query('teststring').. Now it should not be a problem to decode the string to whatever encoding is used by notmuch/xapian internally using 'teststring'.encode('utf8') for example. But can I reliably expect all strings in the index to be valid= utf8? At any rate, I think this conversion should be made from inside the binding= s. A query should return the same results for querystrings as string- and unic= ode literals.=20 Any thoughts? /p --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk4VmlwACgkQlDQDZ9fWxapIPwCgoI/fyOI8iF8VI6TbHYoiJUHY Y5gAnilEeDMhrR636ohh/cw/WE1DWPtZ =fOW3 -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs--