Character encoding in Comments
Moderators: XnTriq, helmut, xnview, Dreamer
Character encoding in Comments
I have thousands of JPG files with comments in the file:comment field that use special Danish characters. I have XnViewMP installed on both a Windows 7 and a Macintosh machine. When I display the comments as info with the images in fullscreen the characters are shown correctly on the Windows machine, but on the Macintosh the special characters are garbled.
Both computers are set up with English as the default language, so I don't understand why XnViewMP behaves differently. I believe there ought to be a choice of encoding for the file:comment field like there is for the iptc:caption field, so that you can correctly display any comment field encodings independent from your computer setup. Is there any way for me to fix the problem with the current version of XnViewMP?
Both computers are set up with English as the default language, so I don't understand why XnViewMP behaves differently. I believe there ought to be a choice of encoding for the file:comment field like there is for the iptc:caption field, so that you can correctly display any comment field encodings independent from your computer setup. Is there any way for me to fix the problem with the current version of XnViewMP?
Re: Character encoding in Comments
Hi Pierre,
I attach a JPG image with Danish characters in the file:Comment field.
Valhal
I attach a JPG image with Danish characters in the file:Comment field.
Valhal
Re: Character encoding in Comments
Can anybody help? I tried setting the locale on the Mac to en_us.iso8859-1 (was en_us.utf8), but it made no difference. It would be nice if XnViewMP could display the comments correctly regardless of the computer setup.
Thank you.
Valhal
Thank you.
Valhal
Re: Character encoding in Comments
you have not that? PS: There is no info in file:comment about encodingValhal wrote:Can anybody help? I tried setting the locale on the Mac to en_us.iso8859-1 (was en_us.utf8), but it made no difference. It would be nice if XnViewMP could display the comments correctly regardless of the computer setup.
Thank you.
Valhal
Pierre.
Re: Character encoding in Comments
Hi Pierre,
I don't understand your question. The picture only shows a small part of the file:comment. I attach one that shows the whole comment using Faststone in Windows 7. If there is no indication of the character encoding for file:comment then XnViewMP should determine the encoding from the text, if possible, like it is done by Notepad++. If it cannot determine the encoding I would suggest that the default guess should be ANSI. ISO 8859-1 is used a lot in Europe and should be easy to determine.
Thanks,
Carl
I don't understand your question. The picture only shows a small part of the file:comment. I attach one that shows the whole comment using Faststone in Windows 7. If there is no indication of the character encoding for file:comment then XnViewMP should determine the encoding from the text, if possible, like it is done by Notepad++. If it cannot determine the encoding I would suggest that the default guess should be ANSI. ISO 8859-1 is used a lot in Europe and should be easy to determine.
Thanks,
Carl
Last edited by Valhal on Fri Jun 09, 2017 11:16 pm, edited 1 time in total.
Re: Character encoding in Comments
Clarification:
On Windows XnViewMP displays the comment like Faststone does. On the Mac, however, the comment is shown like it is on Windows in Exiftool GUI with the special characters garbled:
On Windows XnViewMP displays the comment like Faststone does. On the Mac, however, the comment is shown like it is on Windows in Exiftool GUI with the special characters garbled:
Re: Character encoding in Comments
Strange please check my screenshot, the comment is not like that...Valhal wrote: On Windows XnViewMP displays the comment like Faststone does. On the Mac, however, the comment is shown like it is on Windows in Exiftool GUI with the special characters garbled:
Pierre.
Re: Character encoding in Comments
Hi Pierre,
I don't know if your screenshot is made on a Mac and which program you are using. The fact that XnViewMP displays the comment differently on different computers indicates that there is a problem. XnViewMP should display the comment correctly independent of the type of computer and the computer setup.
I tried the XnViewMP SetComment function on Windows, and more problems arise. The Setcomment window looks like this:
When I replace the second garbled character with the Danish character æ, and write the file, I get the following comment displayed by XnViewMP as well as by Faststone:
Vi tager afsked med Thomas. Han er t�mrer/snedker og arbejder stadig i sit værksted. Hans sidste v�rk er denne paddel lavet af det eftertragtede hawaiianske koa tr�.
The first garbled character was an ø and the next three were æ. You now see that the first æ is correctly encoded in UTF-8 whereas the ø and the last two æ's have been encoded as the garbled character.
XnViewMP cannot assume that the comment is encoded in UTF-8. There needs to be a setting in XnViewMP so that the user can tell the program what the encoding of the comment field is. That would be better and easier to implement than my previous suggestion that XnViewMP try to determine the encoding from the text, which can be impossible for short comments.
Thank you.
Carl
I don't know if your screenshot is made on a Mac and which program you are using. The fact that XnViewMP displays the comment differently on different computers indicates that there is a problem. XnViewMP should display the comment correctly independent of the type of computer and the computer setup.
I tried the XnViewMP SetComment function on Windows, and more problems arise. The Setcomment window looks like this:
When I replace the second garbled character with the Danish character æ, and write the file, I get the following comment displayed by XnViewMP as well as by Faststone:
Vi tager afsked med Thomas. Han er t�mrer/snedker og arbejder stadig i sit værksted. Hans sidste v�rk er denne paddel lavet af det eftertragtede hawaiianske koa tr�.
The first garbled character was an ø and the next three were æ. You now see that the first æ is correctly encoded in UTF-8 whereas the ø and the last two æ's have been encoded as the garbled character.
XnViewMP cannot assume that the comment is encoded in UTF-8. There needs to be a setting in XnViewMP so that the user can tell the program what the encoding of the comment field is. That would be better and easier to implement than my previous suggestion that XnViewMP try to determine the encoding from the text, which can be impossible for short comments.
Thank you.
Carl
Re: Character encoding in Comments
yes on mac, and no problemValhal wrote: I don't know if your screenshot is made on a Mac
i'll add a settings for comment encodingXnViewMP cannot assume that the comment is encoded in UTF-8. There needs to be a setting in XnViewMP so that the user can tell the program what the encoding of the comment field is. That would be better and easier to implement than my previous suggestion that XnViewMP try to determine the encoding from the text, which can be impossible for short comments.
Pierre.
Re: Character encoding in Comments
Dunno if that's relevant: On Windows, all Dano-Norwegian letters are displayed correctly in MP's IPTC-IIM tab and Edit IPTC/XMP dialog after copying the JPEG comment to IPTC caption with XnView Classic's cmd_CopyCommentIntoCaption command.
Re: Character encoding in Comments
Thank you. That would be the best solution.Pierre wrote:
i'll add a settings for comment encoding
Xntriq: Copying all the comments to the IPTC field can also be done with exiftool, but it would be a lot of work for the 30,000 files that I have. And besides, it would be better to improve XnViewMP so that it can correctly display the comment for different encodings of the comment field.
Valhal
Re: Character encoding in Comments
Yes, I absolutely agree, Valhal (-:Valhal wrote:Xntriq: Copying all the comments to the IPTC field can also be done with exiftool, but it would be a lot of work for the 30,000 files that I have. And besides, it would be better to improve XnViewMP so that it can correctly display the comment for different encodings of the comment field.
Re: Character encoding in Comments
This problem is supposed to be fixed in XnView MP 0.87. Please check and confirm the bug fix here.
Pierre.