En Dash / Em Dash using ExifTool

Started by Leonard DeFrancisci, May 04, 2024, 01:13:53 PM

Previous topic - Next topic

Leonard DeFrancisci

I am a beginner and having difficulty with adding an en dash '–' using Exiftool with Microsoft Command Prompt, for example adding "Brooklyn 1914–2006" to the Properties=>Title of an image file (*.jpg).

Since my keyboard does not have a key for en dash, I have to cut and paste it into the Command Prompt instead of typing it in directly. When pasting, the en dash '–' seems to automatically change to a hyphen '-' and after running, the title does in fact have a hyphen instead of an en dash.

Question: is there a way to add an en dash '–' and em dash '—' when using Command Prompt?

Interestingly, when using ExifToolGui (V6.3.1.0 64 Bits) by pasting -Title="Brooklyn 1914–2006" into the 'ExifTool direct' button (located on the bottom left below file names), the en dash appears correctly in the Properties=>Title.

Thank you!

StarGeek

FAQ #18, problems with special characters on the Windows command line covers the issues with Windows command line and UTF characters beyond the simple ASCII characters. The only thing that ever worked for me was the StackOverflow answer mentioned there.

Another option that I use often is to use the -E (-escapeHTML) option and use HTML entities such as —/–

For example
exiftool -E -title="Brooklyn 1914–2006" /path/to/files/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).