<table><tr><td style="">meven created this revision.<br />meven added reviewers: Frameworks, sitter, ngraham.<br />Herald added projects: Dolphin, Frameworks.<br />Herald added subscribers: kfm-devel, kde-frameworks-devel.<br />meven requested review of this revision.
</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/D29381">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>libmagic is the libraray used in <tt style="background: #ebebeb; font-size: 13px;">file</tt> utility to search for file encoding based on heuristics.</p>
<p><tt style="background: #ebebeb; font-size: 13px;">QTextCodec::codecForUtfText</tt> is limited to detecting UTF-8 BOMĀ encoded files.<br />
If this fails <tt style="background: #ebebeb; font-size: 13px;">QTextCodec::codecForLocale</tt> is used to decode all text files, which can be quite incaccurate.</p>
<p>When QTextCodec::codecForUtfText did not find a valid UTF-* file, use libmagic to find a TextCodec.<br />
It can better confirmm UTF-8 presence.<br />
latin-1 is used as default 8-bit ascii codex when libmagic cannot find a precise result.</p>
<p>BUG: 316390<br />
FIXED-IN: 20.08</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>In doplhin, see preview of different non utf-8 encoded text files.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29381">https://phabricator.kde.org/D29381</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
cmake/Findlibmagic.cmake<br />
thumbnail/CMakeLists.txt<br />
thumbnail/config-thumbnail.h.cmake<br />
thumbnail/textcreator.cpp</div></div></div><br /><div><strong>To: </strong>meven, Frameworks, sitter, ngraham<br /><strong>Cc: </strong>kde-frameworks-devel, kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, LeGast00n, cblack, fbampaloukas, alexde, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, rdieter, mikesomov<br /></div>