<table><tr><td style="">krake added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D22352">View Revision</a></tr></table><br /><div><div><p>"Quoted Printable" is essentially just about output encoding, email just has this as the default while VCard V3, for example, has UTF-8.</p>
<p>If "local8Bit" is different to UTF-8 then even a VCard/Contact would need to be "decoded".<br />
So in kabcclient that was even another option, "output codec".</p>
<p>We are currently lucky most people have UTF-8 as the local encoding.</p>
<p>Maybe we should take this the other way around:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">make a switch --raw: no processing of payload data</li>
<li class="remarkup-list-item">if not present, "decode" into QString, then use toLocal8Bit() or qPrintable() to correctly encode for the program's environment</li>
</ul>
<p>We can then later on add "output codec" options if necessary.</p>
<p>Would also make it easier for David right now, essentially just inverting the logic of his flag. Something like</p>
<p>if (mRawPayload) {</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">std::cout << item.payloadData().constData();</pre></div>
<p>} else {</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (email) {
} else {
std::cout << qPrintable(QString::fromUtf8(item.payloadData().constData));
}</pre></div>
<p>}</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R723 Akonadi CLI Client</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22352">https://phabricator.kde.org/D22352</a></div></div><br /><div><strong>To: </strong>dfaure, marten, krake<br /><strong>Cc: </strong>kde-pim<br /></div>