ExifTool Forum

ExifTool => Newbies => Topic started by: mmondry on January 05, 2017, 04:17:59 AM

Title: UNICODE file names...
Post by: mmondry on January 05, 2017, 04:17:59 AM
There are TONS of search results on "UNICODE" but none answer my question.  My @ command file is formatted as below, and I would simply like it to return the expected results.  I tried -charset UTF8, and UTF16 before the -@, but I consistently receive a blank result.

-fast
-FilePath
-rating
-T
c:\photos\Hãy để chúng tôi có niềm vui.jpg
c:\photos\Pozwól nam bawić.jpg
c:\photos\ਸਾਡੇ ਨਾਲ ਮਜ਼ੇਦਾਰ ਹੈ ਕਰੀਏ.jpg
-execute
Title: Re: UNICODE file names...
Post by: Hayo Baan on January 05, 2017, 06:27:07 AM
I reckon you saved the file in UTF8, so that should be fine. I think the problem is the filenames, you'll have to tell exiftool the character set of the filenames (as well). You do that using the −charset filename=CHARSET option. Have a look at the manual (http://www.exiftool.org/exiftool_pod.html#windows_unicode_file_names) for more info.
Title: Re: UNICODE file names...
Post by: mmondry on January 05, 2017, 08:32:18 AM
I'm already using -charset filename=UTF8 -@ {command file} syntax, but the results come back as zero length lines.
Title: Re: UNICODE file names...
Post by: Phil Harvey on January 05, 2017, 10:32:05 AM
Would it be possible to zip your photos directory and send that and your -@ file to me for testing? My email is philharvey66 at gmail.com

- Phil
Title: Re: UNICODE file names...
Post by: Phil Harvey on January 05, 2017, 11:52:42 AM
I got the files, thanks.

It works for me with this command:

exiftool -charset filename=utf8 -@ COMMANDS.TXT

However, the returned tags are empty for these reasons:

1. "Rating" doesn't exist in these files

2. "FilePath" unfortunately doesn't work for Windows Unicode file names

(Did I mention that Unicode file names on Windows are a huge pain in the ass?)

- Phil

Edit: Added missing -@ to command
Title: Re: UNICODE file names...
Post by: mmondry on January 05, 2017, 12:52:59 PM
Yup, that works!  Thanks for your quick response.
Title: Re: UNICODE file names...
Post by: Phil Harvey on January 05, 2017, 12:54:23 PM
OK then, I'm confused.  Isn't that exactly the command you said you were using?

- Phil