Closed akaleeroy closed 4 years ago
This is not a problem of jpeg-recompress
itself, but of the one with which the assembly was performed.
Try:
type D:\Config\Desktop\Șmotru\test.jpg output.jpg | jpeg-recompress.exe -a - testout.jpg
Good workaround, thanks! I still don't get why piping in the input works... are you saying it has to do with the executable's compilation?
Anyway, here's the final compression batch file fixed of Unicode path problems:
:: drag-jpeg-to-recompress.cmd
:: Place this script in the same folder as jpeg-recompress.exe
@echo off
set path=%~d0%~p0
:start
type %1 output.jpg 2>nul | "%path%jpeg-recompress.exe" - %~nx1 || (pause && exit /b 1)
shift
if NOT x%1==x goto start
Say I have a file at
D:\Config\Desktop\Șmotru\test.jpg
Ș
gets converted to?
, breaking the file pathI don't think it's the command prompt since
@chcp 65001>nul
does nothing.