Wildcards with non-ascii paths
Posted: 2015-03-31T17:13:08-07:00
Hi,
on Windows imagemagick doesn't expand input filenames with 'file meta-characters' * or ?, if there are non-english characters in the path to the working directory and no relative path is given with the input filenames.
An example:
C:\temp\test>identify "файл*.jpg"
N"?°???>0.jpg JPEG 500x645 500x645+0+0 8-bit sRGB 102KB 0.000u 0:00.000
N"?°???>1.jpg[1] JPEG 500x417 500x417+0+0 8-bit sRGB 60.9KB 0.000u 0:00.001
works ok (apart from messed filenames in the output), but if I add a russian character to the directory name, then
C:\temp\testЙ>identify "файл*.jpg"
identify.exe: unable to open image `N"?°???>*.jpg': Invalid argument @ error/blob.c/OpenBlob/2675.
doesn't work, even if I give english names to the files ("file*.jpg").
A workaround is to add the relative path:
C:\temp\testЙ>identify ".\файл*.jpg"
.\N"?°???>0.jpg JPEG 500x645 500x645+0+0 8-bit sRGB 102KB 0.000u 0:00.000
.\N"?°???>1.jpg[1] JPEG 500x417 500x417+0+0 8-bit sRGB 60.9KB 0.000u 0:00.001
The same bug happens with convert.exe
I am on english windows 7 64bit
C:\temp\test>convert --version
Version: ImageMagick 6.9.0-10 Q16 x64 2015-02-28 http://www.imagemagick.org
on Windows imagemagick doesn't expand input filenames with 'file meta-characters' * or ?, if there are non-english characters in the path to the working directory and no relative path is given with the input filenames.
An example:
C:\temp\test>identify "файл*.jpg"
N"?°???>0.jpg JPEG 500x645 500x645+0+0 8-bit sRGB 102KB 0.000u 0:00.000
N"?°???>1.jpg[1] JPEG 500x417 500x417+0+0 8-bit sRGB 60.9KB 0.000u 0:00.001
works ok (apart from messed filenames in the output), but if I add a russian character to the directory name, then
C:\temp\testЙ>identify "файл*.jpg"
identify.exe: unable to open image `N"?°???>*.jpg': Invalid argument @ error/blob.c/OpenBlob/2675.
doesn't work, even if I give english names to the files ("file*.jpg").
A workaround is to add the relative path:
C:\temp\testЙ>identify ".\файл*.jpg"
.\N"?°???>0.jpg JPEG 500x645 500x645+0+0 8-bit sRGB 102KB 0.000u 0:00.000
.\N"?°???>1.jpg[1] JPEG 500x417 500x417+0+0 8-bit sRGB 60.9KB 0.000u 0:00.001
The same bug happens with convert.exe
I am on english windows 7 64bit
C:\temp\test>convert --version
Version: ImageMagick 6.9.0-10 Q16 x64 2015-02-28 http://www.imagemagick.org