Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
poppler
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 613
    • Issues 613
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • poppler
  • poppler
  • Issues
  • #75

Closed
Open
Opened Feb 08, 2013 by Bugzilla Migration User@bugzilla-migration

pdf* utilities cannot open files with non-ASCII characters in file path on Windows

Submitted by aur..@..il.com

Assigned to poppler-bugs

Link to original bug (#60517)

Description

Created attachment 74453 PDF test files

pdfinfo and pdftotext (have not tested others) cannot open PDF files with UTF-8 characters in file path.

Environment:

Windows 7 Pro (x64)

poppler.0.22.0_win32: I've been having trouble compiling poppler myself, so I got poppler.0.22.0_win32 binaries from http://blog.alivate.com.au/poppler-windows/ (perhaps this is not a problem with official binaries, which I could not find)

Steps to reproduce:

  1. Download PDF test files (or create PDF file with UTF-8 character in the name, e.g. testα)
  2. Open command prompt and navigate to the directory with PDF file
  3. Run chcp 65001 to activate UTF-8 codepage
  4. Run pdfinfo.exe testα.pdf

Outcome: I/O Error: Couldn't open file 'testa.pdf': No such file or directory.

Note that "testα.pdf" is converted to "testa.pdf"

Using the command line to open that same file with Adobe Acrobat Reader 11.0 worked just fine, so the characters are being correctly passed from the commandline to the program.

Here's a summary of my tests

poppler.0.22.0_win32\bin\pdfinfo.exe test.pdf Tagged: no Form: none Pages: 1 Encrypted: no Page size: 612 x 792 pts (letter) Page rot: 0 File size: 14622 bytes Optimized: no PDF version: 1.4

poppler.0.22.0_win32\bin\pdfinfo.exe testα.pdf I/O Error: Couldn't open file 'testa.pdf': No such file or directory.

poppler.0.22.0_win32\bin\pdftotext.exe test.pdf

poppler.0.22.0_win32\bin\pdftotext.exe testα.pdf I/O Error: Couldn't open file 'testa.pdf': No such file or directory.

Looking at poppler's code, it looks like a win32 version of PDFDoc constructor is defined in PDFDoc.cc

#ifdef _WIN32
PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
	       GooString *userPassword, void *guiDataA) {

but LocalPDFDocBuilder.cc calls the general PDFDoc constructor no matter what (by always passing a GooString* instead of wchar_t*). Can't test this though, since I'm having trouble compiling poppler.

Attachment 74453, "PDF test files":
test.tar.bz2

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: poppler/poppler#75