D29381: Thumbnail text: use libmagic to detect encoding

Méven Car noreply at phabricator.kde.org
Wed May 6 08:02:02 BST 2020


meven added a comment.


    Perhaps it'd make sense to refactor this a bit and construct some test cases around encoding detection so we get a sense of reliablity?
    
    The way I am looking at this: either libmagic always does the best job at detecting encodings, at which point we'll want it as a required dep, or there's something better in which case we don't want libmagic at all and instead use the something better ;)
    
    In the end the user isn't necessarily in charge of what a random file will be encoded with, so I don't think there's a point in letting the user (or the distro) build an inferior product by accidentally not including libmagic. The truth is neither we nor the user can with any certainty say what encodings the thumbnailer will encounter.
  
  Well I am doubting now libmagic is the way to go:
  It is quite limited in encoding detection :
  https://invent.kde.org/snippets/875
  Compared to https://en.wikipedia.org/wiki/Character_encoding#Common_character_encodings

REPOSITORY
  R320 KIO Extras

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

To: meven, #frameworks, sitter, ngraham
Cc: pino, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200506/6b1a5e56/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list