Giter Club home page Giter Club logo

Comments (4)

lmacken avatar lmacken commented on July 22, 2024

This seems to do the trick.

commit 853e9964906ec5fba8a1058e2a796c053deb771c
Author: Luke Macken <[email protected]>
Date:   Sun Aug 14 12:34:26 2011 -0400

    Decode our author names to unicode before encoding to UTF-8 when replying

diff --git a/alot/command.py b/alot/command.py
index 711bfd8..f569bd0 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -476,7 +476,7 @@ class ReplyCommand(Command):
         mail = self.message.get_email()
         # set body text
         mailcontent = '\nOn %s, %s wrote:\n' % (self.message.get_datestring(),
-                self.message.get_author()[0])
+                self.message.get_author()[0].decode('utf-8'))
         for line in self.message.accumulate_body().splitlines():
             mailcontent += '>' + line + '\n'


from alot.

pazz avatar pazz commented on July 22, 2024

ah yes, i remember this one: i deliberately removed this decode because spaetz agreed to
return valid unicode strings. a patch for the api has already been filed to the notmuch ml,
but is not yet applied. i am reluctant to fix this here because its going to be a non-issue
once spaetz pushes the api patch.
anyway, thanks for the issue.. keep them comming :p
/p

Sent via Hubroid

from alot.

lmacken avatar lmacken commented on July 22, 2024

Great, sounds good to me!

Ensuring that the API always returns unicode definitely is ideal, as my patch doesn't exactly fit the "decode early, encode late. unicode everywhere." methodology :)

from alot.

pazz avatar pazz commented on July 22, 2024

i'll close this here as spaetz has just pushed my patch

from alot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.