umlauts again...

Started by mapper905, October 24, 2023, 10:07:45 AM

Previous topic - Next topic

mapper905

The json (-j) output "SourceFile" value doesn't understand umlauts (I get '?' instead).  I've read FAQs 10 & 18 and experimented with -charset options, but can't seem to get this to work.  I'm sure I'm missing something simple...?

c:\exif>exiftool -j -ImageSize 1รถ.jpg
[{
  "SourceFile": "1?.jpg",
  "ImageSize": "6252x4168"
}]

StarGeek

Windows command line support of non-ascii characters isn't very good. The only other option beside FAQ #18 I can offer is this StackOverflow answer. It's the only thing that ever worked for me.

It does have a downside, though. Some GUIs, especially from older programs, may have the fonts changed which can mess up the GUI.  See this post for an example.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

mapper905

Thanks, StarGeek. Enabling "Beta: Use Unicode..." in control panel > region... worked. I was hoping there was some combination of exiftool switches that might solve, but I think this solution might suffice.

mapper905

After a little reflection, I think I understand better. I see that creating an args input file gets around a lot of the non-ascii problems in Windows for input, but unfortunately exiftool only uses stdout for returning tag info, and just redirecting the output to a file doesn't circumvent the problems. So if exiftool could output to a text file (name passed as an arg), this would be symmetrical to the input args file capability and go a long way towards solving this issue. Is that right? 

Phil Harvey

ExifTool will output to a text file with the -w or -W option.

- 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 ($).