Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SumatraPDF prerelease bug on highlight save to smx if right single quote char in pdf filename #878

Closed
nod5 opened this issue Sep 2, 2017 · 2 comments

Comments

@nod5
Copy link

nod5 commented Sep 2, 2017

Tested in SumatraPDF prerelease version , SumatraPDF-prerelease-10740-install.exe from 2017-07-14 Win10

Settings used: Advanced Settings: AnnotationDefaults: SaveIntoDocument = false

In that mode highlights save to external files, e.g. filename.pdf.smx . That normally works.

Steps to reproduce the crash:

  1. Rename any pdf file a’a.pdf
    Note: that character is "right single quotation mark", see http://www.unicodemap.org/search.asp?search=%E2%80%99 .
  2. select some segment of text and press H to highlight
  3. Press control+S and save with the default filename given in the save dialog.

Expected effect: SumatraPDF should save the highlight to a’a.pdf.smx

Actual effect: SumatraPDF freezes, a blue wheel spins forever. We can force exit with right click on
SumatraPDF taskbar icon > Close Window. Then the popup "SumatraPDF is not responding." shows, with the options "Close the program" and "Wait for the program to respond".

Maybe the bug applies to more unusual characters, I haven't researched that.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented Aug 31, 2018

Whilst many characters are allowed in windows LFN filenames there has been a tradition of many causing problems with scripting, I am guilty of often using & which I know can cause problems with DOS scripts. I used to curse web sites that used TM or R in a circle and don't start me on the difference between a hyphen em or en. Best to tell the user they use non conventional characters at their own risk!
You could try capturing those that are not a-Z or 1-0 and accept a few specials such as a'postrophe Actually although ' does work for both files I think it is also used for other file handling so best to parse filename and warn user such ansi characters or unicode may cause a problem later, but accept them all, perhaps with an un check box for "warn me" since it may annoy most international users.

@GitHubRulesOK
Copy link
Collaborator

@kjk confirmed its still a problem that Pre-release SumatraPDF hangs when attempting to make changes to write a’a.pdf.smx I can't post as the filename is unacceptable :-) (which realy says it all)
image
so can only send a surrogate pdf (you would need to copy and paste the shown name)
a’a.pdf
a a.pdf.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants