From: Patrick Totzke <patricktotzke@googlemail.com>
To: notmuch@notmuchmail.org
Subject: [python] querystrings as unicode literals?
Date: Thu, 7 Jul 2011 12:37:00 +0100 [thread overview]
Message-ID: <20110707113700.GA16347@megatron> (raw)
[-- Attachment #1: Type: text/plain, Size: 612 bytes --]
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 bindings.
A query should return the same results for querystrings as string- and unicode literals.
Any thoughts?
/p
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2011-07-07 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 11:37 Patrick Totzke [this message]
2011-07-11 9:32 ` [python] querystrings as unicode literals? Sebastian Spaeth
2011-07-11 9:43 ` [PATCH] python: Encode query string as a utf-8 byte array Sebastian Spaeth
2011-07-11 9:49 ` [PATCH v2] " Sebastian Spaeth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110707113700.GA16347@megatron \
--to=patricktotzke@googlemail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).