unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Encodings
@ 2011-07-11 14:04 Sebastian Spaeth
  2011-07-11 15:03 ` Encodings Carl Worth
  2011-07-12 21:29 ` Encodings Patrick Totzke
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Spaeth @ 2011-07-11 14:04 UTC (permalink / raw)
  To: Notmuch developer list

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

Hi all,
after I was notified about how notmuch's python bindings perform
differently depending on whether we hand it (byte-based) ASCII strings
or unicode, I tried to disentangle what encodings to expect and send it
to. The answer is that things are very implicit. notmuch.h speaks of
strings but never mentions encodings, xapian docs don't mention
encodings but ojwb confirmed that it expects utf-8.

So, can be document what encoding we are expected to pass in the various
APIs and where we can guarantee to actually return UTF-8 encoded
strings? For some of the stuff we read directly from the files, eg
arbitrary headers, we can probably be least sure, but are e.g. the
returned tags always utf-8?

I would love to make the python bindings use unicode() instances in
cases where we can be sure to actually receive utf-8 encoded strings.

Encodings make my brain hurt. Unfortunately one cannot simply ignore
them.

Sebastian

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 14:04 Encodings Sebastian Spaeth
2011-07-11 15:03 ` Encodings Carl Worth
2011-07-12 20:27   ` Encodings Patrick Totzke
2011-07-12 21:29 ` Encodings Patrick Totzke
2011-07-13  7:04   ` Encodings Uwe Kleine-König
2011-07-13  9:03     ` Encodings Patrick Totzke

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