D22352: Add option --decode-emails for the show command.

Kevin Krammer noreply at phabricator.kde.org
Wed Jul 10 11:32:56 BST 2019


krake added a comment.


  "Quoted Printable" is essentially just about output encoding, email just has this as the default while VCard V3, for example, has UTF-8.
  
  If "local8Bit" is different to UTF-8 then even a VCard/Contact would need to be "decoded".
  So in kabcclient that was even another option, "output codec".
  
  We are currently lucky most people have UTF-8 as the local encoding.
  
  Maybe we should take this the other way around:
  
  - make a switch --raw: no processing of payload data
  - if not present, "decode" into QString, then use toLocal8Bit() or qPrintable() to correctly encode for the program's environment
  
  We can then later on add "output codec" options if necessary.
  
  Would also make it easier for David right now, essentially just inverting the logic of his flag. Something like
  
  if (mRawPayload) {
  
    std::cout << item.payloadData().constData();
  
  } else {
  
    if (email) {
    } else {
        std::cout << qPrintable(QString::fromUtf8(item.payloadData().constData));
    }
  
  }

REPOSITORY
  R723 Akonadi CLI Client

REVISION DETAIL
  https://phabricator.kde.org/D22352

To: dfaure, marten, krake
Cc: kde-pim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190710/be4204fb/attachment-0001.html>


More information about the kde-pim mailing list