Bug 462743 - Okular markdown backend mismanages UTF-8 encoded chars
Summary: Okular markdown backend mismanages UTF-8 encoded chars
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: markdown backend (show other bugs)
Version: 22.04.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-07 15:19 UTC by Sergio
Modified: 2022-12-09 15:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (3 bytes, text/plain)
2022-12-08 18:00 UTC, Sergio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio 2022-12-07 15:19:55 UTC
SUMMARY

Markdown documents with an UTF-8 encoding have non-ascii chars misrendered.

STEPS TO REPRODUCE
1. Create a markdown document with some non-ascii chars, using the UTF-8 encoding, for instance insert the char "æ" in the document  
2. Open the document with okular
3. See weird chars in place of the UTF-8 encoded non-ascii chars. For instance "æ" renders as "æ"

OBSERVED RESULT

The markdown backend uses some (hardcoded?) encoding, maybe Latin1.

EXPECTED RESULT

For documents format where the adopted encoding is not "written inside the document", the okular backend should use the user default encoding as provided by the locale and optionally provide a way to select a different encoding.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-56-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 15,3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Comment 1 Albert Astals Cid 2022-12-08 17:06:18 UTC
Please attach such a file
Comment 2 Sergio 2022-12-08 18:00:34 UTC
Created attachment 154436 [details]
Test case
Comment 3 Sergio 2022-12-08 18:09:28 UTC
Right after providing the test case, I have noticed that I see the issue in kubuntu 22.04, but not in Manjaro.

The difference among the two are:
- Manjaro has a more recent version of okular (22.08.3 vs 22.04.3)
- Manjaro packs the markdown plugin in the main okular package, while ubuntu splits it out in its own package
Comment 4 Albert Astals Cid 2022-12-09 15:28:36 UTC
Since it works for you (and for me) in a newer version, there's nothing to do.