Hi, Phil
Windows has 2 types of cmdline encodings : system default and Unicode, which one is used depends on executable main function (main and wmain).
I don't know much about compiling perl program into *.exe, but i suspect that only system default encoding is supported now (for example you have to switch system encoding to japanese to be able to process files with japanese names).
I've investigated similar issue with ImageMagick some time ago: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=19242.
So i would like to know is it possible to add this feature to exiftool?
This has been a problem for quite some time, but I haven't found a solution yet.
However, looking again I just found this solution (http://stackoverflow.com/questions/4232397/perl-managing-path-encoding-on-windows) which sounds promising. I will try this.
- Phil
One of the possible places (and the most probable) where encoding is broken - executable wrapper (if it does not use wmain function we have to search for another build tool). Simple test can show it: compile program that takes Unicode parameter converts it to utf8 and prints to file.
I've tried to look through exiftool sources/makefiles, but could not find where exactly executable is created.
The solution from stackoverflow is not actually a solution: they just using function to detect system default encoding and convert to any encoding they need, example: if system default - russian then you can only pass russian and english file names, but japanese will fail and so on.
If you explain me how wrapper is created i will try to help.
Thanks.
The exiftool executable is created using the PAR module (http://search.cpan.org/dist/PAR/), same as in the stackoverflow thread.
Unfortunately I don't know the details about the inner working of PAR.
- Phil
I think you could try GetCommandLineW function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms683156%28v=vs.85%29.aspx)
Thanks for the suggestion. I'll look into it.
- Phil