Bug 2119762

Summary: Evince does not use utf-8 in search strings
Product: [Fedora] Fedora Reporter: Lukas Ruzicka <lruzicka>
Component: evinceAssignee: Marek Kašík <mkasik>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 37CC: awilliam, caillon+fedoraproject, feborges, gnome-sig, kparal, mclasen, mkasik, robatino, rstrode, sandmann
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-22 17:07:09 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:    
Bug Blocks: 2009539    
Attachments:
Description Flags
See how searches are treated. none

Description Lukas Ruzicka 2022-08-19 10:53:44 UTC
Created attachment 1906523 [details]
See how searches are treated.

Description of problem:
Evince does not use utf-8 in search strings and therefore is unable find occurences in language using non-ascii characters.

Version-Release number of selected component (if applicable):
evince-43~alpha-4.fc37.x86_64 

How reproducible:
Always

Steps to Reproduce:

The latest version of Evince on Fedora seems not to be using utf-8 encoding in searches which limits the search possibilities in all languages that use non-ascii characters. The following examples are made on a Czech system.
Reproducer (you can see the illustration below):

* Open the search bar (Ctrl-F).
* Type řekla (meaning [she] said)
* Notice, that řekla has not been found and is indicated by red color.
* Notice, that if Julie is found instead, there is a occurence of řekla Julie (Julie said), however the leading character has not been correctly recognized and its representation in the search results is incorrect.
* In the text itself, all characters are correctly shown.
* When I copy the text using Ctrl-C, I am getting øekla Julie instead of řekla Julie.

I believe that the strings might not be treated as utf-8 in places lacking the correct characters. It would be nice if the application would be able to use correct encoding even in searches and copied out strings.

Actual results:
Incorrect search results for non-ascii languages.

Expected results:
Searches should be possible even for different characters.

Additional info:
Also reported upstream: https://gitlab.gnome.org/GNOME/evince/-/issues/1839

Comment 1 Fedora Blocker Bugs Application 2022-08-19 10:55:47 UTC
Proposed as a Blocker for 37-final by Fedora user lruzicka using the blocker tracking app because:

 I am proposing this to for a discussion about the problem being blockery in the scope of Basic Functionality.

Comment 2 Kamil Páral 2022-08-19 11:24:13 UTC
Let's have the conversation in upstream, so that we don't split it into several places. I added a comment there.

Comment 3 Adam Williamson 2022-08-22 17:07:09 UTC
Per upstream discussion, this turned out to be a bug in the PDF file, not in Evince. Acrobat also can't find the string.