Summary: | Dolphin displays text file previews with wrong encoding | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Māris Nartišs <maris.kde> |
Component: | thumbnail | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bastianholst, bugzilla, cfeck, cuidaditoconelperro, peter.penz19 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Dolphin displays text file with wrong encoding |
Description
Māris Nartišs
2010-02-23 10:13:49 UTC
Created attachment 41029 [details]
Dolphin displays text file with wrong encoding
Where do those Chinese glyphs come from?!?
The Chinese glyphs come from wrong detection of the text encoding. I tried using KEncodingProber::confidence(), but I could not get it to be "unsure" even for small text files. I have no idea how it works internally, but if it's not possible to make a good guess, maybe it should use following logic: guess fail back to: locale fail back to: UTF-8. Displaying ASCII (C) as UTF-8 will have no harm; It's more than likely that file encoding will match locale encoding (i.e. in my case it's lv_LV.utf8). Of course, if it's possible to make encoding guessing more robust - it's way to go. SVN commit 1103862 by cfeck: Use default locale encoding unless it is UTF It has to be seen if it is better to assume the locale encoding than to guess a wrong encoding. CCBUG: 228172 M +15 -3 textcreator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1103862 *** Bug 236695 has been marked as a duplicate of this bug. *** I didn't have this problem until I updated from kdemod 4.4.3 to regular kde 4.4.80 so I guess it's a configuration isuue, because 4.4.3 had cfeck's patch. I'm using ArchLinux x86_64 and my locale is es_AR.utf8 Andrés, the patch from comment #4 went to trunk (4.5), not 4.4 branch. Then the patch is not working for me. Seems to be working just fine with 4.6.0. |