Non-latin characters in IPTC data

Started by jaqee00, September 19, 2012, 06:00:42 AM

Previous topic - Next topic

jaqee00

I'm using Exiftool to import file names for my iPad images in Photo Shack app.
the command code given by the developer was
exiftool "-iptc:ObjectName<filename" -overwrite_original *.*
it worked great for latin file names, but not for non-latin file names(chinese & japanese)

I've tried -charset and -lang, but none of them work, and I kept getting "Melformed UTF8" and "Invalid or unsupported language" in cmd, and I've tried using Big5, GB, ja, zh-tw....etc. But zh-tw and ja were listed under "available languages"?? why can't I use it?

I've also found a different solution, which is to use -L
it worked in computer and showed every non-latin characters, but when I transfer the images into iPad's Photo Shack app, file name show up as rubbish, but folder names is fine, and I can manually rename images in Chinese. so the problem is the IPTC data was set to UTF8, and can't be read in iPad.

I've also used ExiftoolGUI, and found out the images IPTC codedcharacterset was UTF8, but I have no idea how to change that...
so the question is, how do I set the language/characterset in Chinese so it can be read in iPad as file name?
thank you.

Phil Harvey

This should work fine provided you set IPTC:CodedCharacterSet to UTF8 and your other applications honour this character set.

You might get more reliable results with special characters if you use XMP instead of IPTC.

> exiftool レン.jpg '-iptc:objectname<filename' -iptc:codedcharacterset=utf8
    1 image files updated

> exiftool レン.jpg -iptc:objectname
Object Name                     : レン.jpg


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

jaqee00

Is it possible that when I transfer files via iTunes, the names got mess up? Because the characters are fine when in computer, but once I transfer them via iTunes and open images in Photo Shack, the names turned into rubbish.

Also, the code you provided, you file a file name within the code, does that mean I'll have to modify the files one by one? Is there a way to do that in batch?

Thank you.

Phil Harvey

It does sound like iTunes may be causing problems, but I really don't know for sure.

It doesn't matter how you specify the files on the command line (wildcards, directory names, etc), it will work just fine.

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

jaqee00

Ok, here the problem I've found out, which is likely casued by exiftool:
I used the following code to duplicate filename/basename into IPTC objectname
exiftool -charset iptc=UTF8 "-iptc:ObjectName<basename" -overwrite_original" *.*

but when I use ExiftoolGUI to check the IPTC info, ObjectName turned into unrecognizeble characters
and when I use exiftool -codeccharasterset=UTF8 -charset iptc=UTF8 "-iptc:ObjectName<basename" -overwrite_original" *.*
the only difference is the extra "CodedCharacterSet" data, the ObjectName is still rubbish, please see image link below

https://picasaweb.google.com/lh/photo/aPHpbWXDv3tEtdddQBnMsdMTjNZETYmyPJy0liipFm0?feat=directlink

Can you tell me how to code them so I can get Traditional Chinese IPTC Objectname? The app I'm using need the IPTC ObjectName to use as filename, so the image can be displayed with a title, as shown below:
https://picasaweb.google.com/lh/photo/RKlM1mwg4voTDHtMNSVpg9MTjNZETYmyPJy0liipFm0?feat=directlink

Thank you.

Phil Harvey

I was assuming that you were running on a Mac, but apparently I was wrong since you are using ExifToolGUI.  This should work on a Mac because the system uses UTF-8 for file names.  Getting this to work in Windows may be very difficult, or even impossible, and I don't think I can help you with this.

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