ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: mapper905 on October 24, 2023, 10:07:45 AM

Title: umlauts again...
Post by: mapper905 on October 24, 2023, 10:07:45 AM
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"
}]
Title: Re: umlauts again...
Post by: StarGeek on October 24, 2023, 10:42:47 AM
Windows command line support of non-ascii characters isn't very good. The only other option beside FAQ #18 (https://exiftool.org/faq.html#Q18) I can offer is this StackOverflow answer (https://stackoverflow.com/questions/57131654/using-utf-8-encoding-chcp-65001-in-command-prompt-windows-powershell-window/57134096#57134096). 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 (https://exiftool.org/forum/index.php?topic=13370.msg72233#msg72233) for an example.
Title: Re: umlauts again...
Post by: mapper905 on October 24, 2023, 11:39:36 AM
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.
Title: Re: umlauts again...
Post by: mapper905 on October 25, 2023, 07:38:44 AM
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? 
Title: Re: umlauts again...
Post by: Phil Harvey on October 25, 2023, 08:42:24 AM
ExifTool will output to a text file with the -w or -W option.

- Phil