ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: exedesign on February 12, 2013, 11:32:18 AM

Title: "öçşğü" character not rename
Post by: exedesign on February 12, 2013, 11:32:18 AM
Hi Everybody, Sorry my bad English;
my file name and folder name "Öçş/ğüş.jpg" I can't rename and write metadata file. my code.

C:\exiftool.exe -xmp:subject=öçşçşçş -iptc:keywords=şüğüğü -Title=şçö -filename=pppp.jpg -r -directory=Öçş ğüş.jpg


Thanks for help.

Title: Re: "öçşğü" character not rename
Post by: Phil Harvey on February 12, 2013, 11:54:23 AM
Right.  This is a known problem (https://exiftool.org/index.html#problems) with Perl on Windows that I haven't been able to solve.  ExifTool can not handle Unicode characters in Windows file names.  Sorry.

- Phil
Title: Re: "öçşğü" character not rename
Post by: Tor on September 16, 2013, 09:02:38 AM
In windows, as long as your files are local, you can shorten the name and exiftool will be able to read it. Short windows names does not have any special character besides ~. It works with the example given in this thread.

You can get the short name using "dir /x [fileName/dir]" and then some substantial dir traversal/substring magic, or if your'e a programmer you can use GetShortPathName ( http://msdn.microsoft.com/en-us/library/windows/desktop/aa364989(v=vs.85).aspx , this is how I did it with .Net ), I'm not too good on perl so I don't know if Inline::C could do it in perl perhaps.

Unfortunately, this does not work 100% for UNC Paths, perhaps another quirk in perl under windows. Mapping the UNC to a drive does not help you here either.  I have made it work for a few types of shares (a standard windows implementation of CIFS probably works) but when your mapped drives are on unix and the likes it does not always work for some reason.