Bug 316390 - Text preview - problem with accents (wrong characters encoding ?)
Summary: Text preview - problem with accents (wrong characters encoding ?)
Status: REOPENED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: 19.12
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-08 22:19 UTC by Nicofo
Modified: 2021-04-23 15:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
wrong preview in dolphin (16.91 KB, image/png)
2013-03-08 22:20 UTC, Nicofo
Details
wrong thumbnail (84.44 KB, image/png)
2018-01-20 20:06 UTC, Nicofo
Details
a-utf8.txt -> correctly displayed (6 bytes, text/plain)
2018-10-01 20:21 UTC, Nicofo
Details
* b-iso8859.txt -> wrongly displayed (5 bytes, text/plain)
2018-10-01 20:21 UTC, Nicofo
Details
screenshot of dolphin of both files (6.10 KB, image/png)
2018-10-01 20:22 UTC, Nicofo
Details
test file - windows-1252 encoding (10 bytes, text/plain)
2021-04-23 15:47 UTC, Patrick Silva
Details
screenshot of text file with windows-1252 encoding (73.46 KB, image/png)
2021-04-23 15:48 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicofo 2013-03-08 22:19:03 UTC
The preview of text files is wrong if text contains accents.
Example: the file "aa.txt" contains the text "test-éèà"
The preview displays "test-???" (see screenshot)

If the file is opened with kwrite => no problem.

Rem: the problem is present depending of the encoding of the file:
- with "UTF-8 Unicode text": no problem
- with "ISO-8859 text" or "Non-ISO extended-ASCII text" => problem in dolphin (but not in kwrite or other editor)
[the name of the encoding is the result of the 'file' command]

Reproducible: Always




The problem is the same in the main view of dolphin if in preview mode. But it less visible since the preview is little.
Comment 1 Nicofo 2013-03-08 22:20:03 UTC
Created attachment 77876 [details]
wrong preview in dolphin
Comment 2 Frank Reininghaus 2013-03-10 16:53:33 UTC
Thanks for the bug report, but Dolphin itself does not generate the previews. I hope that kio/thumbnail is the right product.
Comment 3 Nicofo 2017-12-28 11:00:52 UTC
Problem still present with 
- Dolphin 17.08.1
- KDE Frameworks 5.40.0
Comment 4 Patrick Silva 2018-01-20 15:39:55 UTC
Cannot reproduce on Arch Linux, dolphin 17.12.1, frameworks 5.42.
Comment 5 Nicofo 2018-01-20 20:06:25 UTC
Created attachment 110019 [details]
wrong thumbnail

I have still the problem, as you can see on the attached screenshot: a.txt and b.txt files contain the same data "tést" but with different encoding:
  a.txt: UTF-8 Unicode text
  b.txt: ISO-8859 text

The thumbnail for b.txt is wrong in the main view of dolphin and in the right panel. a.txt is correct.
  dolphin 17.08.1
  KDE Frameworks 5.42.0

@Dr Chapatin: Strange that you don't have the same issue. Any idea what could cause that issue on my system ? (we have same version of frameworks)...
Comment 6 Patrick Silva 2018-01-20 20:12:57 UTC
(In reply to Nicofo from comment #5)
 
> @Dr Chapatin: Strange that you don't have the same issue. Any idea what
> could cause that issue on my system ? (we have same version of frameworks)...

No, sorry. I'm just an end user.
Comment 7 Nate Graham 2018-06-29 20:59:57 UTC
Works for me too with KDE Frameworks 5.47 and Dolphin 18.04.2 on KDE Neon with Qt 5.11. If anyone can reproduce the issue with these versions (or newer), please re-open.
Comment 8 Nicofo 2018-09-29 21:27:32 UTC
Sorry, I reopen, this is not fixed for me.
 - KDE Frameworks 5.48.0
 - Qt 5.11.1 (built against 5.11.1)
 - dolphin-18.04.3

Still same result as in screenshot of comment #5
What could make the difference between your installation and mine concerning this bug ?
Comment 9 Nate Graham 2018-09-29 22:26:14 UTC
Nicofo, could you attach a file that is causing you problems?
Comment 10 Nicofo 2018-10-01 20:21:34 UTC
Created attachment 115349 [details]
a-utf8.txt  ->  correctly displayed

Attached:
* a-utf8.txt  ->  correctly displayed
* b-iso8859.txt   ->  wrongly displayed
* screenshot of dolphin of both files
Comment 11 Nicofo 2018-10-01 20:21:59 UTC
Created attachment 115350 [details]
* b-iso8859.txt   ->  wrongly displayed
Comment 12 Nicofo 2018-10-01 20:22:22 UTC
Created attachment 115351 [details]
screenshot of dolphin of both files
Comment 13 Christoph Feck 2018-10-01 20:45:47 UTC
The encoding auto-detection in the text thumbnailer was disabled, because it failed to detect UTF-8 most of the time. I remember I tested both KEncodingProber as well as KEncodingDetector back then; maybe there are changes in KEncodingProber today that make it work better.

https://cgit.kde.org/kio-extras.git/tree/thumbnail/textcreator.cpp
Comment 14 Nicofo 2020-05-16 20:17:44 UTC
(versions updated) - bug still present with:
 - KDE Frameworks 5.68.0
 - Qt 5.13.2 (built against 5.13.2)
 - dolphin-19.12.2
 - kio-extras-19.12.2-1.fc32.x86_64
Comment 15 Patrick Silva 2021-02-15 12:27:09 UTC
This bug is happening on Arch Linux.

KDE Plasma Version: 5.21 beta
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 16 Patrick Silva 2021-04-23 15:47:18 UTC
Created attachment 137836 [details]
test file - windows-1252 encoding

On my system I can reproduce with text files with windows-1252 encoding.
I'm attaching a test file and a screenshot.

Operating System: Arch Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Graphics Platform: X11
Comment 17 Patrick Silva 2021-04-23 15:48:30 UTC
Created attachment 137837 [details]
screenshot of text file with windows-1252 encoding