Bug 747976 - Okular can't read synctex files from utf8 directories
Summary: Okular can't read synctex files from utf8 directories
Alias: None
Product: Fedora
Classification: Fedora
Component: okular
Version: 18
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-10-21 15:15 UTC by Hedayat Vatankhah
Modified: 2013-02-08 17:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-01 17:11:21 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
KDE Software Compilation 313700 None None None Never

Description Hedayat Vatankhah 2011-10-21 15:15:33 UTC
Description of problem:
I am trying to use Kile+Okular under Fedora 16 to write me thesis using XeLaTeX. I use SyncTex to synchronize these two applications. It worked fine in Fedora 15, but in 16 it doesn't work. Investigating a bit, I found that Okular have problems with reading synctex data from the directory with utf8 characters in its name. This is the result when I try to open okular manually: 

[hedayat@hedayat-lap ~]% /usr/bin/okular --unique "file:/mnt/hedayat/درس<200c>ها/پروژه پایانی/final_report/thesis.pdf#src:1599/mnt/hedayat/درس<200c>ها/پروژه پایانی/final_report/thesis.tex"
SyncTeX Warning: No tag for /mnt/hedayat/??????/????? ??????/final_report/thesis.tex

As can be seen, it replaces utf8 characters with '?', and then it is unable to load synctex data.

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

How reproducible:

Steps to Reproduce:
1. create a tex document using Kile in a directory with non-latin characters.
2. Configure Kile's build options for PDFLatex/XeLaTeX to use "Modern" build (which generates SyncTeX data)
3. Compile your document using PDFLatex or XeLaTeX
4. Try ForwardPDF
Actual results:
Document opens in Okular, but it doesn't go the the same line as you are in Kile.

Expected results:
It should open the document on the same line as where you are in Kile in the document.

Additional info:
If I create a symlink to my document in a path with only Latin characters, ForwardPDF works fine. However, still when I Shift+Click in a part of document in Okular, it doesn't go to the same line in Kile... It could be a separate bug though.

Comment 1 Kevin Kofler 2011-10-21 15:23:47 UTC
What is your system locale set to? It should be an @UTF-8 locale.

Comment 2 Hedayat Vatankhah 2011-10-21 16:28:41 UTC
My locale is fa_IR.utf8
But I have also tried en_US.UTF-8 and encountered the same error.

Comment 3 Kevin Kofler 2011-10-21 16:46:35 UTC
FYI, ".utf8" is deprecated, you should be using fa_IR.UTF-8 instead. But that's probably not the problem here.

Comment 4 Hedayat Vatankhah 2011-10-21 17:24:06 UTC
Yes, as I said I've also tried en_US.UTF-8. About .utf8, this is what Fedora has set by itself (I have changed my language using Gnome's language preferences). If it is deprecated, a separate bug against Fedora or maybe Gnome should be filled. Fedora 15 also used .utf8. But I remember that in older Fedora releases it was UTF-8. (Maybe UTF-8 is deprecated in favor of .utf8?!).

Comment 5 Kevin Kofler 2011-10-21 17:40:07 UTC
Uhm, we'll have to ask the glibc/gettext maintainers there. (There used to be .utf8 at some point, then .UTF-8 became the standard way to write it, maybe they changed their mind again. :-/ ) But it's not the problem. I guess Okular is using toLatin1 or toAscii (or an implicit toAscii, i.e. a missing to* call) instead of toLocal8Bit on the QString. Why this regressed compared to earlier releases, I don't know, we'll have to check the upstream history.

Comment 6 Fedora End Of Life 2013-01-16 19:29:19 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 7 Hedayat Vatankhah 2013-01-16 19:49:30 UTC
It happened in Fedora 17 too.

Comment 8 Hedayat Vatankhah 2013-01-22 16:50:52 UTC
Same in Fedora 18. This is really a bug in okular. The other way around works just fine: if I shift+click a part of the document, kile jumps to the specified line. But can't use ForwardPDF in Kile to open the specified line in Okular.

Comment 9 Rex Dieter 2013-01-22 17:39:25 UTC
Mind filing a bug upstream @ bugs.kde.org ?  That's likely what it'll take to get this resolved properly.  (It'll take someone who is experiencing this to have a dialog upstream, else I'd help do it).

Comment 10 Hedayat Vatankhah 2013-01-22 18:06:09 UTC
Ok, done. Thanks!

Comment 11 Rex Dieter 2013-01-22 18:07:04 UTC
Thank you.

Comment 13 Fedora Update System 2013-01-23 01:26:06 UTC
okular-4.9.5-2.fc18 has been submitted as an update for Fedora 18.

Comment 14 Fedora Update System 2013-01-23 01:28:25 UTC
okular-4.9.5-2.fc17 has been submitted as an update for Fedora 17.

Comment 15 Fedora Update System 2013-01-23 16:11:47 UTC
Package okular-4.9.5-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing okular-4.9.5-2.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 16 Hedayat Vatankhah 2013-01-28 12:07:25 UTC
I don't know why, but it seems that the problem still exists. I wonder if it is related to upstream or the fedora package?

Comment 17 Rex Dieter 2013-01-28 13:02:56 UTC
OK, I'm silly.  I didn't apply the patch properly in the 4.9.5-2 build.  I'll try to fix it properly now. :-/

Comment 18 Fedora Update System 2013-02-01 17:11:22 UTC
okular-4.9.5-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2013-02-08 17:01:26 UTC
okular-4.9.5-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.