Error in accented filenames -Windows 7 64 Bits-

Started by Guzman, March 23, 2015, 05:54:38 AM

Previous topic - Next topic

Guzman

Error in filenames with accents.

What I have to do to make exiftool supports filenames with accents?

Exiftool 9.90 on Windows 7 (64 Bits) and Java 7

Java code:
args.add (EXIF_TOOL_PATH);
args.add ("-stay_open");
args.add ("True");
args.add("-charset filename=cp65001");
args.add ("-@");
args.add ("-");

http://www.exiftool.org/exiftool_pod.html#windows_unicode_file_names

The filename character set applies to the FILE arguments as well as filename arguments of -@, -geotag, -o, -p, -srcfile, -tagsFromFile, -csv=, -j= and -TAG<=. However, it does not apply to the -config filename, which always uses the system character set.
The -charset filename= option must come before the -@ option to be effective, but the order doesn't matter with respect to other options.

Getting error:
File not found


Hayo Baan

Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

One obvious mistake I can see is that "-charset filename=cp65001" should be two arguments, not one.

Note that you must re-specify -charset after each -execute as well.  Also, the -charset must only come before -@ if the argfile name contains special characters (which it doesn't).  Perhaps I should be more specific in the documentation.

Then this should work as long as the filenames passed in are UTF8.  (cp65001 is equivalent to utf8)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Guzman

Great, now works.

-charset filename=cp65001" must be on separate lines.

Java code:
args.add (EXIF_TOOL_PATH);
args.add ("-stay_open");
args.add ("True");
args.add("-charset");
args.add("filename=cp65001");
args.add ("-@");
args.add ("-");

Thank you very much.