Hi Phil,
I need your help with writing utf-8 characters to file. I saw discussion in this forum (and it was even discussion about application, which I inherited now), but it doesn't seem to work.
The application is installed on UNIX server and is using Exiftool 9.43. The console doesn't seem to display non ascii characters. Exiftool will be invoked from Java Process. Is it correct, that all utf-8 characters will not be written into the file?
This is example of command to be executed from java: exiftool -charset utf8 -XMP-dc:Description="Saint-Rémy" C:\Users\nadja\Pictures\dancing.jpg
Second question:
I'm testing locally on my machine Windows 7 Enterprise, Service Pack 1. Exiftool Version is 9.96. Windows Console does display non-ascii characters. I'm using Lucinda Fonts, and executed before: chcp 65001. I can write and display non-ascii output from console correctly:
example:
C:\Users\nadja>echo Saint-Rémy > utf.txt
C:\Users\nadja>type utf.txt
Saint-Rémy
(NOt sure, if you'll be able to see screenshot).
But writing these characters using utf-8, doesn't display them correctly:
Here is example:
exiftool -charset Latin2 C:\Users\nadja\Pictures\soldatova.jpg
Reading of updated metadata:
C:\Users\nadja>exiftool -charset Latin2 C:\Users\nadja\Pictures\soldatova.jpg
ExifTool Version Number : 9.96
File Name : soldatova.jpg
Directory : C:/Users/nadja/Pictures
File Size : 59 kB
File Modification Date/Time : 2015:06:17 13:26:41-07:00
File Access Date/Time : 2015:06:17 13:26:41-07:00
File Creation Date/Time : 2015:03:31 12:40:03-07:00
File Permissions : rw-rw-rw-
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.02
Resolution Unit : inches
X Resolution : 72
Y Resolution : 72
Current IPTC Digest : 65b9fa8d01939c2dc45333b141fcefe0
Original Transmission Reference : NVAcDRHzwcdm0Tb51cS_
XMP Toolkit : Image::ExifTool 9.96
Description : Saint-RΘmy
Image Width : 599
Image Height : 900
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 599x900
Megapixels : 0.539
Btw, I tried before with -charset Latin and -charset utf8, didn't work either.
What did I miss?
Thanks a lot in advance,
Nadja
Hi Nadja,
Quote from: nadja on June 17, 2015, 05:21:27 PM
The application is installed on UNIX server and is using Exiftool 9.43. The console doesn't seem to display non ascii characters. Exiftool will be invoked from Java Process. Is it correct, that all utf-8 characters will not be written into the file?
This is example of command to be executed from java: exiftool -charset utf8 -XMP-dc:Description="Saint-Rémy" C:\Users\nadja\Pictures\dancing.jpg
I don't understand your question. The command looks fine, but the
-charset utf8 is superfluous since UTF-8 is the default. It will work if the é is UTF-8 encoded.
QuoteI'm testing locally on my machine Windows 7 Enterprise, Service Pack 1. Exiftool Version is 9.96. Windows Console does display non-ascii characters. I'm using Lucinda Fonts, and executed before: chcp 65001. I can write and display non-ascii output from console correctly:
But writing these characters using utf-8, doesn't display them correctly:
Here is example:
exiftool -charset Latin2 C:\Users\nadja\Pictures\soldatova.jpg
Why did you specify Latin2? I thought your console was using UTF-8 (chcp 65001).
- Phil
Hi,
I tested with -charset Latin (or with -L), -charset Latin2 and with UTF8, none of these encoding is writing special characters.
On Linux, it doesn't seem to work either (I tested with latin2, utf8 and latin).
This is excert of LINUX CONSOLE:
exiftool -h -charset latin -overwrite_original -XMP-dc:Description='Saint-Rémy' /home/nadja/pics/soldatova.jpg
1 image files updated
exiftool -charset latin -a -g /home/nadja/pics/soldatova.jpg
---- ExifTool ----
ExifTool Version Number : 9.43
---- File ----
File Name : soldatova.jpg
Directory : /home/nadja/pics
File Size : 59 kB
File Modification Date/Time : 2015:06:18 10:54:33-07:00
File Access Date/Time : 2015:06:18 10:54:33-07:00
File Inode Change Date/Time : 2015:06:18 10:54:33-07:00
File Permissions : rw-rw-rw-
File Type : JPEG
MIME Type : image/jpeg
Current IPTC Digest : 65b9fa8d01939c2dc45333b141fcefe0
Image Width : 599
Image Height : 900
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
---- JFIF ----
JFIF Version : 1.02
Resolution Unit : inches
X Resolution : 72
Y Resolution : 72
---- IPTC ----
Original Transmission Reference : NVAcDRHzwcdm0Tb51cS_
---- XMP ----
XMP Toolkit : Image::ExifTool 9.43
Description : Saint-R?my
---- Composite ----
Image Size : 599x900
otuser@mmdev10 ~/mediamanager/exiftool:
The console can display non ascii characters.
Can I do anything else?
Thanks,
You're making this much more difficult than it needs to be.
Quote from: nadja on June 18, 2015, 02:00:39 PM
exiftool -h -charset latin -overwrite_original -XMP-dc:Description='Saint-Rémy' /home/nadja/pics/soldatova.jpg
1 image files updated
1. Linux uses UTF-8 by default. Why are you specifying Latin?
2. The -h option has no effect when writing.
Quoteexiftool -charset latin -a -g /home/nadja/pics/soldatova.jpg
Again. Why are you specifying Latin? Remove the
-charset options from both commands and you should be fine on Linux. Also, add
-XMP-dc:Description to the command to avoid extracting information irrelevant to this thread.
- Phil
Hi Phil, :)
I want to thank you for help. Its working now.
Have a good one,
Nadiia