unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [python] querystrings as unicode literals?
@ 2011-07-07 11:37 Patrick Totzke
  2011-07-11  9:32 ` Sebastian Spaeth
  2011-07-11  9:43 ` [PATCH] python: Encode query string as a utf-8 byte array Sebastian Spaeth
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Totzke @ 2011-07-07 11:37 UTC (permalink / raw)
  To: notmuch

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-11  9:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 11:37 [python] querystrings as unicode literals? Patrick Totzke
2011-07-11  9:32 ` 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

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).