Tip: UTF-8 and ECP (Unicode in Windows command line)

Started by akirot, November 04, 2020, 12:01:33 PM

Previous topic - Next topic

akirot

I always encounterd an error ("...File not found...") when using ECP working on files with a German Umlaut in the filename and/or path.
Never I spent time on this since I achieved my goal using exiftool directly.
Recently and incidently I found a (the?) solution on the exiftool forum. It works on my system:

"Unicode in Windows command line": https://exiftool.org/forum/index.php?topic=11770.0
Mentioned reference to "stackoverflow": https://stackoverflow.com/questions/57131654/using-utf-8-encoding-chcp-65001-in-command-prompt-windows-powershell-window/57134096#57134096

Might be of interest to others.

Mario

This is normal. Do you use old ECP presets perhaps? This has been resolved by ExifTool a long time ago...
For example, the preset "List Metadata" must look like this:

-G1
-all
-a
-charset
filename=UTF8
{Files}

The key part is

-charset
filename=UTF8


which tells ExifTool that the file name is in UTF-8 encoding.
German umlauts, Chinese, Russian or other non-ASCII characters no problem.

Which preset do you use and does it contain this specifier?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

akirot

Aaah,
that's even better (avoiding some side effects of the other solution).
I used the "old" presets. (I continuously use IMatch and exiftool since IMatch 3.x)
The exiftool "-charset" option never came into my mind since ETGUI (which I still use outside IMatch) does work without it.

Another finding (possibly you can fix this):
Using ECP to just read (not write) some data works fine.
However, closing(!) ECP triggers the directory modified flag - requiring a rescan to get rid of it.
Not the preset execution triggers the flag, closing ECP does it.
Having an explorer window open in parallel I don't see any temp file(s) created.
Since I keep my filesystem (and especially IMatch) clean this is irritating.

Can this be avoided please? (Propably you have added a "brute force" trigger to ECP close to be on the safe side?)

Mario

Since IMatch cannot know what you did in the ECP, it always marks the folder as pending.
Doing a quick rescan to check for new or updated or deleted files. Why is this a problem? This is super fast and you usually won't even notice this.
Also, Windows may sent "folder modified" notifications to IMatch for a wide range of reasons. Which then causes IMatch to do a quick scan.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook