Skip to content

Error installing PDE on Spanish version of Windows #2

@evgc01

Description

@evgc01

Hi,

I tried to install PDE on R for windows (spanish version) but when I ran the command "PDE_install_Xpdftools4.02()" I got the following strange error:

Error in system(paste0(""", pdftotext_location[i], "" "", "-layout", :
'"INFORMACI�N: no se pudo encontrar ning�n archivo para los patrones dados."' not found

INFORMACIÓN: no se pudo encontrar ningún archivo para los patrones dados"

Browsing across the source code of "PDE_install_Xpdftools4.02()", I found it first calls "PDE_check_Xpdf_install()".

And in turn PDE_check_Xpdf_install() executes this line of code several times:

    if (sysname == "Windows") {
        pdftotext_location <- suppressWarnings(system("C:\\WINDOWS\\system32\\cmd.exe /c where pdftotext", 
            intern = TRUE))
        if ("INFO: Could not find files for the given pattern(s)." %in% 
            pdftotext_location)

"INFO: Could not find files for the given pattern(s)" is the response "where" command returns when a file is not found but just in the english version of windows.
In the spanish one the response is "INFORMACIÓN: no se pudo encontrar ningún archivo para los patrones dados" which is the spanish translation, and because of encodings, the non english charactes appears distorted. It happens the system is windows, but obviouly is not a valid location, so an error is thrown.

Is there any workaround?

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions