Thread

Posted on Thu Apr 24 03:17:00 2008 by tilo
Passing in non-ASCII characters via a parameter file
Hello, How do I pass in non-ASCII characters through a parameter file? Do I encode the entire file in UTF-8? Or do I encode it in ASCII and use some kind of "escape character and a number" notation to pass the Unicode code points into the -TAG= parameters? When I properly feed Unicode into exiftool, is it going to take care of all the intricacies of byte ordering, prefixing UserComment with UNICODE 0x00, etc.? Or do I have to prepare the parameters somehow before feeding them into ExifTool? How tolerant are applications with regards to non-ASCII characters that are put into tags that officially only support ASCII? I see German umlauts in these tags sometimes, and am not aware of any problems, but strictly speaking Umlauts are not ASCII, but 8859-1 or 8859-15. Thanks for any pointers, Tilo
Direct Responses: 7750 | Write a response
Posted on Thu Apr 24 14:20:10 2008 by exiftool in response to 7743
Re: Passing in non-ASCII characters via a parameter file
You should read FAQ number 10.

By default, exiftool assumes all input is in UTF-8 and converts it appropriately for the type of information you are writing (adding "UNICODE\0" as necessary, etc).

Writing non-ASCII characters to ASCII tags is possible, and exiftool passes through these characters without translation. This is not advisable though, because it is very likely that these characters may display differently on different systems. I would imagine that most software would display them according to the default codepage for that locale, (which would be 8859-1 for the majority of systems in North America for instance).

- Phil
Write a response