Main Menu

Cyrillic (again)

Started by Newsky, September 01, 2015, 12:43:31 PM

Previous topic - Next topic

Newsky

Simple, the topic certainly beaten, but the answer either in the forum or in the FAQ (10,18), I could not find. More precisely, I do not understand his mistake.

https://youtu.be/wVicWMwxECo

Explain please, "what am I doing wrong?"
And if you allow me, tell me, in which metadata can add a comment (description)(IPTC?, XMP?, XPComment? etc.), and how this can be done?
Thank you and I apologize once again.
Sorry for my english. I use Google translator

Phil Harvey

Did you try reading back the command in the cmd.exe window after writing it?  This should work because cmd.exe is set to the same character set you are writing.

I think your problem is that ExifToolGUI is interpreting the Cyrillic characters as UTF-8.

However, the JPEG Comment isn't a good tag to use because the encoding is not specified.  Instead, I would recomment XMP:Description.

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

Newsky

Quote from: Phil Harvey on September 01, 2015, 02:41:40 PM
Did you try reading back the command in the cmd.exe window after writing it?
Yes of course. The result is exactly the same.
Quote from: Phil Harvey on September 01, 2015, 02:41:40 PM
However, the JPEG Comment isn't a good tag to use because the encoding is not specified.  Instead, I would recomment XMP:Description.
But using ExifToolGUI comment Cyrillic entered and displayed without any problems
Sorry for my english. I use Google translator

Phil Harvey

Quote from: Newsky on September 01, 2015, 03:18:12 PM
Quote from: Phil Harvey on September 01, 2015, 02:41:40 PM
Did you try reading back the command in the cmd.exe window after writing it?
Yes of course. The result is exactly the same.

Then I don't understand.  I think you need to run some tests yourself to see what is happening.  The exiftool -echo option may be useful for this.  Try echoing back some Cyrillic characters to see if they are displayed properly.

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

Newsky

In the end, I settled on this version:
exiftool -charset Cyrillic -xmp-dc:description="description in Cyrillic" -charset Cyrillic -xpcomment="description in Cyrillic" -overwrite_original -m
As such, all data is displayed correctly in the Cyrillic alphabet.
But still, I would like to add:
-XPComment>Comment
But as such data is not copied to Comment. Do not help to draw up a code?
exiftool -charset Cyrillic -xmp-dc:description="description in Cyrillic" -charset Cyrillic -XPComment="description in Cyrillic" -XPComment>Comment -overwrite_original -m
Sorry for my english. I use Google translator

Hayo Baan

Quote from: Newsky on September 06, 2015, 07:07:12 AM
In the end, I settled on this version:
exiftool -charset Cyrillic -xmp-dc:description="description in Cyrillic" -charset Cyrillic -xpcomment="description in Cyrillic" -overwrite_original -m
As such, all data is displayed correctly in the Cyrillic alphabet.
But still, I would like to add:
-XPComment>Comment
But as such data is not copied to Comment. Do not help to draw up a code?
exiftool -charset Cyrillic -xmp-dc:description="description in Cyrillic" -charset Cyrillic -XPComment="description in Cyrillic" -XPComment>Comment -overwrite_original -m

Your command won't work because a naked > on the command line means redirecting the output to a file. You'll need to add quotes around it (single quote on Mac/Linux, double quotes on windows). Furthermore copying a tag to another tag is done with a < and with the parameters switched, but I think in this case it will copy the original value of xpcomment and not the new one you set in the same command so you might need to use two exiftool runs to do that (but I'm not 100% certain about that).
Hayo Baan – Photography
Web: www.hayobaan.nl

Newsky

Yes, thank you, I already knew about the quotes. As a result, here with such code it worked as I wanted
exiftool -charset Cyrillic "-xmp-dc:description=Кириллица" -charset Cyrillic "-XPComment=Кириллица" -overwrite_original -m -r d:\photo -execute "-XPComment>Comment" -overwrite_original -m -r d:\photo
Sorry for my english. I use Google translator

StarGeek

Quote from: Hayo Baan on September 06, 2015, 04:36:26 PMFurthermore copying a tag to another tag is done with a < and with the parameters switched,

Tag copying will go whichever way the the sign is going.  See forth paragraph under -tagsFromFile.
c:\>exiftool -Description -caption-abstract X:\!temp\Test3.jpg
Description                     : Description
Caption-Abstract                : Caption-Abstract

c:\>exiftool -P -overwrite_original "-Description>Caption-Abstract" X:\!temp\Test3.jpg
    1 image files updated

c:\>exiftool -Description -caption-abstract X:\!temp\Test3.jpg
Description                     : Description
Caption-Abstract                : Description
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hayo Baan

Quote from: StarGeek on September 06, 2015, 06:01:03 PM
Tag copying will go whichever way the the sign is going.  See forth paragraph under -tagsFromFile.

Ah, you live and learn ;D
Hayo Baan – Photography
Web: www.hayobaan.nl

Newsky

No I can not understand the essence of the work with the Cyrillic alphabet :(

in order...

I learned a little bit to use the Total Commander with the Exiftool
1. Create a button in the TC:
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\soft\exiftool\exiftool.exe
-m -@ "samples\iphone4S.txt" -overwrite_original -charset filename=UTF8 -@ %UL
%COMMANDER_PATH%\icons\iphone.ico
iPhone 4S

1
-1


2. iphone4S.txt:
-n
-EXIF:Software=
-XMP-lr:all=
-XMP-xmpmm:all=
-XMP-photoshop:all=
-XMP-dc:all=
-XMP-mp:all=
-XMP-mwg-rs:all=
-keywords=2016
-keywords=Россия
-IFD0:Model=iPhone 4S
-EXIF:LensModel=iPhone 4S back camera 4.28mm f/2.4
-EXIF:Make=Apple
-EXIF:Artist=*****
-XMP-dc:Creator=*****
-XMP-iptcCore:CreatorCountry=Russia
-XMP-iptcCore:CreatorCity=Moscow
-IPTC:By-line=*****
-EXIF:Copyright=© *****
-XMP-dc:Rights=© *****
-XMP-iptcCore:CreatorWorkEmail=****@me.com
-IPTC:CopyrightNotice=© *****
-XMP-exifEX:LensInfo=4,28 4,28 12/5 12/5
-ExifIFD:LensInfo=4,28 4,28 12/5 12/5
-Photoshop:CopyrightFlag=True



Everything works fine except:
1. -keywords=Россия I get: ??????
I tried:
-charset Cyrillic -m -@ "samples\iphone4S.txt" -overwrite_original -charset filename=UTF8 -@ %UL
-charset filename=Cyrillic -charset Cyrillic -m -@ "samples\iphone4S.txt" -overwrite_original -charset filename=UTF8 -@ %UL
and still I get ?????? instead of Россия
I have long studied the FAQ but no, I can not understand the essence of the work with the Cyrillic alphabet.
What should be done when the file names or paths have Cyrillic? What should I do if some of the values you want to add metadata values in Cyrillic? Well, I did not understand :(

2. Why do not add value -Photoshop:CopyrightFlag=True
Maybe I'm just stupid :(
Sorry for my english. I use Google translator

Phil Harvey

For Keywords, you need to also write IPTC:CodedCharacterSet.  Try adding -charset IPTC=utf8 to your command.  This will work along with the -charset cyrillic to translate from your input cyrillc (assuming iphone4S.txt is stored in cyrillic) to UTF-8 for IPTC.  But I would suggest dropping the -charset cyrillic and using UTF-8 for iphone4S.txt because it should be more straighforward to write a UTF-8 txt file.

The CopyrightFlag should be written OK.  I don't understand why you are having problems 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 ($).

Newsky

something I'm doing wrong...
https://youtu.be/Bp7WN8bvxbc
Sorry for my english. I use Google translator

Phil Harvey

I'm sorry.  I said to add -charset IPTC=UTF8 to your command, but I should have said -codedcharacterset=UTF8.  The effect is the same when writing, but to read it back properly -charset IPTC=UTF8 would also have to be added to the read command unless CodedCharacterSet is set to UTF8.

About the copyright flag...  Try this from the command line:

1. exiftool -copyrightflag=true FILE
2. exiftool -copyrightflag -a FILE

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

Newsky

All, I was confused. And finally I do not understand what I'm doing.
A lot of "either-or"...  file  iphone4S.txt stored in UTF-8 encoding.
I still always stored in UTF 8 encoding.
-codedcharacterset=utf8 -m -@ "samples\iphone4S_utf8.txt" -overwrite_original -charset filename=UTF8 -@ %UL

Sorry for my english. I use Google translator

Phil Harvey

I suggest you simplify things.  Can you get it to work from the command line using text input/output files?:

exiftool "-iptc:keywords<=in.txt" -codedcharacterset=UTF8 FILE

Then do this:

exiftool -iptc:keywords -b FILE > out.txt

If "in.txt" is encoded in UTF-8, then "out.txt" should be identical, and should give you back what you wrote in UTF-8.

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

Newsky

Quote from: Phil HarveyCan you get it to work from the command line...
Yes, i can, but...
1. Most importantly, I wanted to understand the essence of working with Cyrillic characters
2. I want to use ExifTool in this form, together with Total Commander

I leave everything as it is (unfortunately) no Cyrillic characters, and keywords have to be added to the LR. It would exclude LR from the process, but it is impossible.
Thank you very much for your help, Phil, I'm sorry, I'm interrupting you with their stupid requests
Sorry for my english. I use Google translator

Phil Harvey

The ExifTool part should be easy to understand, and it seems that it does work for you.  So it seems your problem is in the way that Total Commander handles special characters.  If you can figure this out you should be able to solve your problem.  I'm sorry I can't help more because I'm still not clear on exactly what you are doing, and I don't have any way to reproduce your problem.

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

ryerman

Try removing the -n option from "samples\iphone4s.txt"
Windows 10 Home 64 bit, Exiftool v12.61

Newsky

ryerman! Your council has worked! Huge thanks to you!
I have removed -n and have added -codedcharacterset=UTF8
And -Photoshop:CopyrightFlag=True works now!
Once again big all thanks!
Sorry for my english. I use Google translator

Phil Harvey

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

ryerman

Thanks. I wish I could say I found the solution with logic and knowledge!
But sometimes "trial and error" or "the brute force method" solves a problem; understanding may come afterwards.
Windows 10 Home 64 bit, Exiftool v12.61