synctex: Use Windows ANSI versions of the PathFind... methods
ClosedPublic

Authored by mludwig on Jan 17 2018, 5:00 AM.

Details

Summary

Okular source references don't work on Windows at the moment when synctex is involved (compiled with MSVC 2017).

The problem seems to originate from the fact that the wchar_t versions of PathFindFileName and PathFindExtension are automatically used.
However, path names are given in an 8-bit encoding to synctex (QFile::encodeName) and the synctex code is really only prepared for 8-bit encodings.

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mludwig created this revision.Jan 17 2018, 5:00 AM
Restricted Application added a project: Okular. · View Herald TranscriptJan 17 2018, 5:00 AM
mludwig requested review of this revision.Jan 17 2018, 5:00 AM
rkflx added a subscriber: rkflx.Jan 19 2018, 12:30 AM

Thanks for the Diff. I cannot try your patch on Windows, but if it works for you and fixes the problem I guess this is fine.

One minor thing: Could you add the patch file to core/synctex/patches/series? (quilt would do this automatically, but adding it manually is also okay…)

This revision was not accepted when it landed; it landed in state Needs Review.Jan 19 2018, 8:29 PM
This revision was automatically updated to reflect the committed changes.