I'm not sure why this gives an error while all my other dynamic links work fine (all ExifTool modules are linked dyamically).
I recently added the Encode use (in version 5.67). It fixes a problem if the users passes UTF8-encoded strings via the API, but if you're going through the exiftool script, this isn't a problem. The Encode module should be standard with Perl 5.8 or greater, so I'm surprised you get this error. However, maybe we can avoid this error by wrapping the 'require' in an 'eval'. Try this:
If this works for you, I'll make this change to the official version.
If it is calling _utf8_off(), then the Encode module must have been loaded, so you must have it. It doesn't make sense.
The following line WILL work instead, but is slower so I would rather not do this in the official version:
So I'm at a bit of a loss trying to get something that works for everyone yet doesn't compromise performance.
But I think I have figured out a more portable way of doing this which doesn't compromise performance on most systems:
This should work for you because the eval will fail, forcing the data to be repacked. And on systems that support Encode::is_utf8() the data is only repacked if necessary (which is almost never), so it won't slow things down too much. I have updated the my version of ExifTool with this change.
As you may have learned, this whole Perl/Unicode thing can be a bit confusing.
Thanks for your help in sorting this out.