This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
@HakimipousI did some testing around this, and had no issues with your command calling it directly in the Run Command tool, or running it via a PowerShell script. However, if I tried to use the command in a batch script the Windows cmd prompt wouldn't recognize the unicode character. In testing the unicode character was dropped which causes the command to fail. This occurred even though the bat file was created with the correct characters in the command, and when the bat file was called directly from the cmd prompt as well as via the Run Command tool. As such it appears this issue is due to a limitation of batch scripts rather than an issue with the Run Command tool.
As you can see in the bat file the ' î ' is clearly present in the command, but when the bat file is run from the command line this unicode character is left out. I have attached my testing samples for this along with working samples using PowerShell script and the Run Command tool directly. Please note these samples assume both cpdf.exe and your PDF file are in C:\temp\cpdfTest\ please update the paths as appropriate for your testing.
@Hakimipous I did a bit more digging as I was curious as to why the batch file wouldn't recognize the character properly. This appears to be due to the code page setting that the Windows cmd prompt defaults to. In most cases it will default to code page 437 (IBM437) or something similar depending on your OS region. By default we are outputting the bat file as ansi text using the 'ISO 8859-1 Latin I' code page when creating the bat file with the Run Command tool. As these code pages are very different it is causing the characters to be translated incorrect for extended characters. To work around this you can set the code page for the cmd prompt in your batch file. The example batch file below should work for you.
The 'chcp 28591' command at the beginning will set the correct code page before running the next command allowing for the characters to be interpreted correctly. If you use a different code page for your output file you will need to adjust the number of the code page accordingly. You can find a reference of most common code pages and their identifier number at: https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756(v=vs.85).aspx
Also as an additional note if you want to see the current code page setting in the cmd prompt you can run 'chcp' by itself with no arguments to return the code page instead of setting one.
@Hakimipous As long as you leave the code page as "ISO 8859-1 Latin I" in the Run Command tool the 'chcp 28591' should work fine for you. If you change it you will need to adjust the number for that command. For example if you change the Run Command's code page setting to UTF-8 you would need to change the batch file command to 'chcp 65001' to accommodate the correct code page.