Bug 413304 - Chinese characters instead of Polish diacritical marks
Summary: Chinese characters instead of Polish diacritical marks
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.8.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-22 08:15 UTC by Pyjter
Modified: 2019-10-29 21:28 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test file (42 bytes, text/markdown)
2019-10-22 08:27 UTC, Yuri Chornoivan
Details
Test file for Polish diacritical marks (35 bytes, text/markdown)
2019-10-22 08:41 UTC, Pyjter
Details
Screenshot (100.87 KB, image/png)
2019-10-22 08:42 UTC, Pyjter
Details
Screenshot with Okular rendering of the test.md file (9.60 KB, image/png)
2019-10-22 08:52 UTC, Yuri Chornoivan
Details
broken rendering in okular (58.00 KB, image/png)
2019-10-26 11:44 UTC, Dave Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pyjter 2019-10-22 08:15:06 UTC
SUMMARY
I get Chinese characters instead of Polish diacritical marks while viewing Markdown files.

STEPS TO REPRODUCE
1. Open any Markdown file with Polish diacritical marks in Okular
 

OBSERVED RESULT

膮, 膰, 臋, 艂, 艅, 贸, 艣, 藕,
EXPECTED RESULT
 ą, ć, ę, ł, ń, ó, ś, ź, ż

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Tumbleweed OpenSuse
KDE Plasma Version: 5.17.0
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
Other applications works as expected.
Comment 1 Yuri Chornoivan 2019-10-22 08:27:37 UTC
Created attachment 123395 [details]
Test file

Cannot confirm this (Discount 2.2.6, Okular 1.8.70) with the attached test file.

Can you attach an example file that does not work?

Thanks in advance for your answer.
Comment 2 Yuri Chornoivan 2019-10-22 08:29:38 UTC
Needs an example file.
Comment 3 Pyjter 2019-10-22 08:41:22 UTC
Created attachment 123397 [details]
Test file for Polish diacritical marks
Comment 4 Pyjter 2019-10-22 08:42:45 UTC
Created attachment 123398 [details]
Screenshot
Comment 5 Pyjter 2019-10-22 08:48:50 UTC
Just added my example file.
I get same problem with your test file.
Comment 6 Yuri Chornoivan 2019-10-22 08:52:34 UTC
Created attachment 123399 [details]
Screenshot with Okular rendering of the test.md file

Cannot confirm as well. :(

Any ideas on how to reproduce this? What is your system locale (is it UTF-8-compatible)?
Comment 7 Pyjter 2019-10-22 09:13:25 UTC
My locale is pl_PL.UTF-8
I don't have any idea how to reproduce it on other system. Okular doesn't have much options regarding markdown. 
Ghostwriter works just fine. But I prefer Okular for viewing markdown files.
Comment 8 Pyjter 2019-10-22 09:27:53 UTC
The same problem appears with txt, but not in odt and pdf files.
Comment 9 Albert Astals Cid 2019-10-24 21:49:33 UTC
Do you get any warning if you start okular from the command line (i.e. konsole)?
Comment 10 Pyjter 2019-10-25 18:50:42 UTC
(In reply to Albert Astals Cid from comment #9)
> Do you get any warning if you start okular from the command line (i.e.
> konsole)?

No, I don't get any error but when I open test.markdown file i get every time strange message:
`discarding "Send sms via KDE Connect" ("ShareUrl")`
Comment 11 Albert Astals Cid 2019-10-25 21:06:56 UTC
Sadly, needs someone to be able to reproduce it before being able to fix it
Comment 12 Pawel 2019-10-26 06:09:46 UTC
Cannot reproduce with https://bugs.kde.org/attachment.cgi?id=123397 - Polish diacritical marks are correct in Okular.
Comment 13 Dave Gilbert 2019-10-26 11:44:02 UTC
Created attachment 123491 [details]
broken rendering in okular

Happening for me; Fedora 31 - packaged okular 1.7.3
Comment 14 Wolfgang Bauer 2019-10-29 06:27:41 UTC
I can reproduce it too (openSUSE Leap 15.1 with latest Qt5/KF5/Okular from additional repos) if the file is displayed as normal text file. That happens even with the last kdelibs4 based version of Okular (16.08.3), which I tried OOC. ;-)

If it is displayed as markdown, it apparently works fine here.
Comment 15 Wolfgang Bauer 2019-10-29 06:34:41 UTC
PS, I get this debug output if I set "Okular (Generator TXT)" to "Full Debug" in kdebugsettings:
org.kde.okular.generators.txt: Detected "gb18030" encoding based on 3000 chars
Comment 16 Albert Astals Cid 2019-10-29 21:28:57 UTC
right, so rendered as text looks wrong, all you that have wrong rendering, you probably don't have the markdown plugin installed.

About the text rendering looking wrong itself when rendering as text not sure there's much we can do, maybe we could add an option to the txt backend to disable guessing the encoding?