Bug 1954140

Summary: Special characters (áéíóú etc...) don't work when annotating PDF in Okular.
Product: [Fedora] Fedora Reporter: Renan Birck Pinheiro <renan.birck.pinheiro>
Component: okularAssignee: Than Ngo <than>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: eric.brunet, geraldo.simiao.kutz, jreznik, kde-sig, rdieter, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-04 10:07:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1958673    
Bug Blocks:    
Attachments:
Description Flags
Actual result (black on white) x expected result (black on yellow).
none
Creating an anotattion (see that the characters show correctly on the box)
none
result of the previous attempt to add anotation to pdf (only XXXX, no acentuated characters)
none
version of okular, frameworks and qt. none

Description Renan Birck Pinheiro 2021-04-27 16:18:55 UTC
Created attachment 1776073 [details]
Actual result (black on white) x expected result (black on yellow).

Description of problem:
When trying to annotate a PDF in okular in the "typewriter" mode (i.e. writing inline within the PDF), special characters (áéíóú ç etc...) don't appear. However, when I double-click on the annotation, the characters are there.

Version-Release number of selected component (if applicable): 20.12.2


How reproducible:
Seems to be always reproducible, even with a new user and a clean profile.

Steps to Reproduce:
1. Open a PDF.
2. Use the "Annotations" feature in typewriter mode (Typewriter Anotation) and try to enter special characters. (e.g. 'xxx áéíóú xxx').
3. The annotation within the PDF will not have the special characters.

Actual results:
I should get an annotation 'xxx áéíóú xxx'.

Expected results:
I get an annotation 'xxx xxx', but when I double-click on it, it is there.

Additional info:

The attached screenshot shows the actual x the expected result.

Comment 1 Fedora Update System 2021-04-27 18:49:07 UTC
FEDORA-2021-7c3322c978 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-7c3322c978

Comment 2 Fedora Update System 2021-04-28 01:35:02 UTC
FEDORA-2021-7c3322c978 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7c3322c978`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7c3322c978

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Geraldo Simião 2021-04-28 13:05:59 UTC
Tested right now the new update (qt5-qtwayland-5.15.2-6.fc34.x86_64) but this bug still exists on okular.
I will attach prints from the results and the okular version running here.

Comment 4 Geraldo Simião 2021-04-28 13:07:29 UTC
Created attachment 1776599 [details]
Creating an anotattion (see that the characters show correctly on the box)

Comment 5 Geraldo Simião 2021-04-28 13:08:46 UTC
Created attachment 1776601 [details]
result of the previous attempt to add anotation to pdf (only XXXX, no acentuated characters)

Comment 6 Geraldo Simião 2021-04-28 13:10:01 UTC
Created attachment 1776602 [details]
version of okular, frameworks and qt.

Comment 7 Renan Birck Pinheiro 2021-04-28 23:05:40 UTC
Hi,

Even after updating the qt5-qtwayland package by the command in comment 2, the problem still happens.

Comment 8 Éric Brunet 2021-05-30 17:28:31 UTC
I have the exact same problem on my x86_64 fedora 34.

I am using X11 and not wayland.

It used to work fine in fedora 33.

The problem seems to be in the poppler library, and I could work around it in the following way:
I downloaded poppler-0.90.0-7.fc33.x86_64.rpm poppler-qt5-0.90.0-7.fc33.x86_64.rpm and extracted the files libpoppler.so.101.0.0 and libpoppler-qt5.so.1.25.0, which I put in /usr/lib64/
I also put the link from libpoppler.so.101 to libpoppler.so.101.0.0, and I changed the link libpoppler-qt5.so.1 to point to libpoppler-qt5.so.1.25.0 instead of libpoppler-qt5.so.1.27.0

In the end:

$ cd /usr/lib64 ;ls -o libpoppler.* libpoppler-qt*
lrwxrwxrwx. 1 root      24 30 mai   19:06 libpoppler-qt5.so.1 -> libpoppler-qt5.so.1.25.0
-rwxr-xr-x. 1 eric  617648 30 mai   19:02 libpoppler-qt5.so.1.25.0
-rwxr-xr-x. 1 root  638312 31 mars  18:30 libpoppler-qt5.so.1.27.0
lrwxrwxrwx. 1 eric      21 30 mai   18:58 libpoppler.so.101 -> libpoppler.so.101.0.0
-rwxr-xr-x. 1 eric 3739224 30 mai   18:58 libpoppler.so.101.0.0
lrwxrwxrwx. 1 root      21 31 mars  18:30 libpoppler.so.106 -> libpoppler.so.106.0.0
-rwxr-xr-x. 1 root 3780384 31 mars  18:30 libpoppler.so.106.0.0

In this configuration, okular seems to work correctly with accented characters in annotations.

(I first tried to downgrade the poppler package, but dnf was unhappy about that, hence the hack above.)

Comment 9 Rex Dieter 2021-06-01 13:53:20 UTC
Possible poppler bug, see bug #1958673

Comment 10 Renan Birck Pinheiro 2021-06-03 14:19:20 UTC
Hello,

I believe it is that poppler bug. 
When I ran `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e583ac67fd` as recommended in that bug report, the problem doesn't happen anymore.

Comment 11 Than Ngo 2021-06-04 10:07:33 UTC

*** This bug has been marked as a duplicate of bug 1958673 ***